diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars index c7c81d8acdb..fe23b3cde62 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint.handlebars @@ -386,8 +386,20 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _{{operationId}}_oapg( - {{> endpoint_args selfType="api_client.Api" }} + {{> endpoint_args isOverload=true skipDeserialization="False"}} + + @typing.overload + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=true skipDeserialization="True"}} + + @typing.overload + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=true skipDeserialization="null"}} + + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=false skipDeserialization="null"}} """ {{#if summary}} {{summary}} @@ -533,8 +545,20 @@ class BaseApi(api_client.Api): class {{operationIdCamelCase}}(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def {{operationId}}( + {{> endpoint_args isOverload=true skipDeserialization="False"}} + + @typing.overload + def {{operationId}}( + {{> endpoint_args isOverload=true skipDeserialization="True"}} + + @typing.overload + def {{operationId}}( + {{> endpoint_args isOverload=true skipDeserialization="null"}} + def {{operationId}}( - {{> endpoint_args selfType="BaseApi" }} + {{> endpoint_args isOverload=false skipDeserialization="null"}} return self._{{operationId}}_oapg( {{> endpoint_args_passed }} ) @@ -543,8 +567,20 @@ class {{operationIdCamelCase}}(BaseApi): class ApiFor{{httpMethod}}(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def {{httpMethod}}( + {{> endpoint_args isOverload=true skipDeserialization="False"}} + + @typing.overload + def {{httpMethod}}( + {{> endpoint_args isOverload=true skipDeserialization="True"}} + + @typing.overload + def {{httpMethod}}( + {{> endpoint_args isOverload=true skipDeserialization="null"}} + def {{httpMethod}}( - {{> endpoint_args selfType="BaseApi" }} + {{> endpoint_args isOverload=false skipDeserialization="null"}} return self._{{operationId}}_oapg( {{> endpoint_args_passed }} ) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars index 01aa9ddbce7..6c2ca1c83de 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars +++ b/modules/openapi-json-schema-generator/src/main/resources/python/endpoint_args.handlebars @@ -1,8 +1,8 @@ - self: {{selfType}}, + self, {{#if bodyParam}} -{{#with bodyParam}} - body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}}, -{{/with}} + {{#with bodyParam}} + body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}}, + {{/with}} {{/if}} {{#if queryParams}} query_params: RequestQueryParams = frozendict.frozendict(), @@ -17,11 +17,11 @@ cookie_params: RequestCookieParams = frozendict.frozendict(), {{/if}} {{#with bodyParam}} -{{#each content}} -{{#if @first}} + {{#each content}} + {{#if @first}} content_type: str = '{{{@key}}}', -{{/if}} -{{/each}} + {{/if}} + {{/each}} {{/with}} {{#if produces}} accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -31,16 +31,55 @@ {{/if}} stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = 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: bool = 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}} + {{#each responses}} + {{#if isDefault}} ApiResponseForDefault, - {{else}} - {{#if is2xx}} + {{else}} + {{#if is2xx}} ApiResponseFor{{code}}, - {{/if}} - {{/if}} -{{/each}} - api_client.ApiResponseWithoutDeserialization + {{/if}} + {{/if}} + {{/each}} + api_client.ApiResponseWithoutDeserialization, ]: +{{else}} +) -> typing.Union[ + {{#each responses}} + {{#if isDefault}} + ApiResponseForDefault, + {{else}} + {{#if is2xx}} + ApiResponseFor{{code}}, + {{/if}} + {{/if}} + {{/each}} + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, +]: +{{/if}} +{{/eq}} +{{#if isOverload}} + ... +{{/if}} \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py index 9d181743b1c..3505c539fe3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_additionalproperties_allows_a_schema_which_should_validate_request_body class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi index 25e7fbd7895..23de07a7b9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShou class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py index 6b6aad1b775..c7d13d563d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_additionalproperties_are_allowed_by_default_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi index b072f5769c2..c66180f1fce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py index b5f0df3456a..37dff232f54 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_additionalproperties_can_exist_by_itself_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi index d575d1c6850..ef3efd5d961 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py index b13a4db5f81..c3c5547b3b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_additionalproperties_should_not_look_in_applicators_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi index 758b4e14580..68c027ab385 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplica class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py index ed580b82ab2..1a740769684 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_combined_with_anyof_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_combined_with_anyof_oneof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi index d499a70ec06..24dd2d5b629 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof class BaseApi(api_client.Api): + @typing.overload def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_combined_with_anyof_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py index 4eb46ceb57a..8457b7a52c6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi index 60ba6149f6d..fbe048868d0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = Allof class BaseApi(api_client.Api): + @typing.overload def _post_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py index 4e2ae80d04e..6b008f6922d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_simple_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofSimpleTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_simple_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_simple_types_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi index e071ea77f17..94a3d47274b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofSimpleTypes class BaseApi(api_client.Api): + @typing.overload def _post_allof_simple_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_simple_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofSimpleTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py index 93d1a9272c8..1be62584867 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_with_base_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi index e44333eddad..5c7b632cee5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofWithBaseSchema class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py index 82f3d209656..95ef49efc67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_with_one_empty_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi index 06fd162a1f8..e80326e234e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py index f20c2387cf2..f6d05c50666 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_first_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_with_the_first_empty_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi index 1a72c9b8ae7..ff7e0dc8eb3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_first_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_first_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py index 20eb1788e2f..00094f0b382 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_last_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_with_the_last_empty_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi index 176c4f8b2cb..1c37d5c70c4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_last_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_last_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py index 5f554b1a1d9..a9af7413b7f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_two_empty_schemas_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_allof_with_two_empty_schemas_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi index 19a2d2faa39..a24853266b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_two_empty_schemas_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_two_empty_schemas_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py index 0352c3702f9..955a1a5d25f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAnyofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_anyof_complex_types_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi index 192aa4f69c2..94f1b629a9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AnyofComplexTypes class BaseApi(api_client.Api): + @typing.overload def _post_anyof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAnyofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py index e3cdd801ce3..5d0e8827dd6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_anyof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi index 0f5688da5f0..503fca04c40 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = Anyof class BaseApi(api_client.Api): + @typing.overload def _post_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py index 6291b17d5db..0ddf31ae08d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAnyofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_anyof_with_base_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi index 550f76088a4..78513e02119 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py index 7a0c2e75cb5..d0ed4086cd7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_anyof_with_one_empty_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi index bdffc46e920..19c50fa6df9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py index 0ea29561b94..a115131ca83 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_array_type_matches_arrays_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostArrayTypeMatchesArraysRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_array_type_matches_arrays_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_array_type_matches_arrays_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi index eb6d81170cd..e8c39729a53 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays class BaseApi(api_client.Api): + @typing.overload def _post_array_type_matches_arrays_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_array_type_matches_arrays_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostArrayTypeMatchesArraysRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py index 169b8b2a458..e8982b5dd09 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_boolean_type_matches_booleans_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_boolean_type_matches_booleans_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi index d925f9924b0..deec28fb4ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.BoolSchema class BaseApi(api_client.Api): + @typing.overload def _post_boolean_type_matches_booleans_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_boolean_type_matches_booleans_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py index d85026f9e85..4d041d2d9bf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_int_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostByIntRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_int_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_by_int_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi index 8c041d1c729..586c4333e09 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = ByInt class BaseApi(api_client.Api): + @typing.overload def _post_by_int_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostByIntRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_int_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostByIntRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py index 94ae9d6b9dd..d17d606974b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostByNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_by_number_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi index 3993efa159e..a5fc1b67906 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = ByNumber class BaseApi(api_client.Api): + @typing.overload def _post_by_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostByNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostByNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py index 0910a13fa3b..ff52c77fb67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_small_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostBySmallNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_small_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_by_small_number_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi index 36d5e3ab300..e1963d34fae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = BySmallNumber class BaseApi(api_client.Api): + @typing.overload def _post_by_small_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostBySmallNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_small_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostBySmallNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py index 91a8f4e79e0..59e11250fb4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py @@ -80,16 +80,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_date_time_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -140,16 +177,53 @@ class instances class PostDateTimeFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_date_time_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_request_body_oapg( body=body, @@ -163,16 +237,53 @@ def post_date_time_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi index 3b4aa6f83e8..f80237f1977 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi @@ -54,16 +54,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_date_time_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -114,16 +151,53 @@ class BaseApi(api_client.Api): class PostDateTimeFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_date_time_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_request_body_oapg( body=body, @@ -137,16 +211,53 @@ class PostDateTimeFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py index 61318d6c154..53ac9ff030e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_email_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostEmailFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_email_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_email_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi index 58a00c65573..455cffb20dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_email_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostEmailFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_email_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostEmailFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py index 70c9c4adb44..03fbc92b7dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with0_does_not_match_false_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enum_with0_does_not_match_false_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi index e55ac837734..fff6eaf96af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse class BaseApi(api_client.Api): + @typing.overload def _post_enum_with0_does_not_match_false_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with0_does_not_match_false_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py index 3dd0079389c..e761731a65f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with1_does_not_match_true_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enum_with1_does_not_match_true_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi index ab02d1d291a..27054be37ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue class BaseApi(api_client.Api): + @typing.overload def _post_enum_with1_does_not_match_true_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with1_does_not_match_true_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py index c494044acbb..d6b934958b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enum_with_escaped_characters_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi index 1176a75ee70..afb57961b26 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py index 402f766def6..ffd223fd72d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_false_does_not_match0_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enum_with_false_does_not_match0_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi index 557cd7d28f9..79adf584a28 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0 class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_false_does_not_match0_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_false_does_not_match0_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py index 67e63b0793f..2a6e88ab186 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_true_does_not_match1_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enum_with_true_does_not_match1_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi index 9dca08f0d85..c9eb4469475 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1 class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_true_does_not_match1_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_true_does_not_match1_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py index 0027bd0edda..7a23840a643 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enums_in_properties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostEnumsInPropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enums_in_properties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_enums_in_properties_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi index 7068a12c3f7..f34638dfdd8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = EnumsInProperties class BaseApi(api_client.Api): + @typing.overload def _post_enums_in_properties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enums_in_properties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostEnumsInPropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py index 48139406bbe..adb09d15d2d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_forbidden_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostForbiddenPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_forbidden_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_forbidden_property_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi index d9a90d32798..223c9e981ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = ForbiddenProperty class BaseApi(api_client.Api): + @typing.overload def _post_forbidden_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_forbidden_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostForbiddenPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py index 75bca7a9bdc..758846ab519 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_hostname_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostHostnameFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_hostname_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_hostname_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi index ef40355adc4..fbc79cf2f7f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_hostname_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostHostnameFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_hostname_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostHostnameFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py index 1c0ac97d064..3973a5b88d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_integer_type_matches_integers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_integer_type_matches_integers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_integer_type_matches_integers_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi index 7dd7bffef9e..4e24e673e39 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.IntSchema class BaseApi(api_client.Api): + @typing.overload def _post_integer_type_matches_integers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_integer_type_matches_integers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py index 849040ab750..18d69e888b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_request class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi index f6b9fe70ca2..30e634db619 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloa class BaseApi(api_client.Api): + @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py index 024b72c736a..b69c0234373 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostInvalidStringValueForDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_string_value_for_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_invalid_string_value_for_default_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi index 43cd727410a..85816fe2ad5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault class BaseApi(api_client.Api): + @typing.overload def _post_invalid_string_value_for_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_string_value_for_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostInvalidStringValueForDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py index 39e10fae46e..c64a710746f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ipv4_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostIpv4FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv4_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_ipv4_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi index 3aba71094cd..4cd356890e4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_ipv4_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostIpv4FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv4_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostIpv4FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py index c2195715687..757b8d10760 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ipv6_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostIpv6FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv6_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_ipv6_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi index da20f09b8bf..cbee9f20cd4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_ipv6_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostIpv6FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv6_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostIpv6FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py index 86c63e8613d..009e5cecaf6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_json_pointer_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostJsonPointerFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_json_pointer_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_json_pointer_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi index cf655dc8344..25b9d86e8c8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_json_pointer_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_json_pointer_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostJsonPointerFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py index acc6b58ca35..0343e645761 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaximumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maximum_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi index a0fe21e85a9..a3902d12888 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MaximumValidation class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaximumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaximumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py index c4be0df8c1d..fb64b9058ed 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maximum_validation_with_unsigned_integer_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi index bfa19c4e273..31dbe8d04a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py index 791e11c7e18..d1169690a3d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaxitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maxitems_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi index 7ebf68559e8..d491008a602 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MaxitemsValidation class BaseApi(api_client.Api): + @typing.overload def _post_maxitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaxitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py index 82baa3c6f74..440529ffb14 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaxlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maxlength_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi index 389fa871253..f76f395f2ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MaxlengthValidation class BaseApi(api_client.Api): + @typing.overload def _post_maxlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaxlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py index 0079983d6be..33170a13586 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maxproperties0_means_the_object_is_empty_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi index 8b95b9db9ae..553d54a2a27 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py index 302911bb647..f1b40ce7bd5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMaxpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_maxproperties_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi index d2d653f7f85..f9918311841 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MaxpropertiesValidation class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py index 2a163fda70d..e8dcaca6c7d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMinimumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_minimum_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi index e9a2ca6e690..a0fb805269e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MinimumValidation class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMinimumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMinimumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py index ab89cbd51ae..f2e8684ea6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_with_signed_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_minimum_validation_with_signed_integer_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi index 122e426ea13..dbaa16a8d67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_with_signed_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_with_signed_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py index 790e6b1f164..eb49150fb6a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMinitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_minitems_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi index 5ac55630f3e..901e1a24f37 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MinitemsValidation class BaseApi(api_client.Api): + @typing.overload def _post_minitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMinitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMinitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py index 5dab68c54bb..685ad640edf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMinlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_minlength_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi index efbd2d45237..7509a0e6e75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MinlengthValidation class BaseApi(api_client.Api): + @typing.overload def _post_minlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMinlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMinlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py index 330ee1d7047..b4c542fe76c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostMinpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_minproperties_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi index a92e09bb858..0b54f54c197 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = MinpropertiesValidation class BaseApi(api_client.Api): + @typing.overload def _post_minproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostMinpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py index 7bb6109e924..b77c18643ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_nested_allof_to_check_validation_semantics_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi index 7958e9d7d5d..64fb457d3b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics class BaseApi(api_client.Api): + @typing.overload def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py index 4779c8462af..0c856ac82a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_nested_anyof_to_check_validation_semantics_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi index 6e9b84a1841..b533b4a4b4c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics class BaseApi(api_client.Api): + @typing.overload def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py index c7755c17e60..f7be66be6b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostNestedItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_nested_items_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi index 6e7649ccf3b..cd7471b57df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = NestedItems class BaseApi(api_client.Api): + @typing.overload def _post_nested_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostNestedItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostNestedItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py index f730d31d605..982d9f5fbae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_nested_oneof_to_check_validation_semantics_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi index 61ea779a722..aa23a8b53b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics class BaseApi(api_client.Api): + @typing.overload def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py index 2d230e0cfb4..22e24ed005f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py @@ -128,16 +128,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_not_more_complex_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -188,16 +225,53 @@ class instances class PostNotMoreComplexSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_more_complex_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_request_body_oapg( body=body, @@ -211,16 +285,53 @@ def post_not_more_complex_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi index 584ba00cf8e..aca0c794d03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi @@ -102,16 +102,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_not_more_complex_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -162,16 +199,53 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_more_complex_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_request_body_oapg( body=body, @@ -185,16 +259,53 @@ class PostNotMoreComplexSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py index e7d0b186922..6a530cc4a1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_not_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi index b791ed43f46..bdc422fdd3a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py index 649b84303c0..238f3c136e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nul_characters_in_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostNulCharactersInStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nul_characters_in_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_nul_characters_in_strings_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi index 87a26d9477e..a2bdbf3ac40 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = NulCharactersInStrings class BaseApi(api_client.Api): + @typing.overload def _post_nul_characters_in_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nul_characters_in_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostNulCharactersInStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py index 84484c13f69..1eb037191f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_null_type_matches_only_the_null_object_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_null_type_matches_only_the_null_object_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi index 750f0f65ada..2f48f3af11a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.NoneSchema class BaseApi(api_client.Api): + @typing.overload def _post_null_type_matches_only_the_null_object_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_null_type_matches_only_the_null_object_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py index 2629e127692..78812d469d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_number_type_matches_numbers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostNumberTypeMatchesNumbersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_number_type_matches_numbers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_number_type_matches_numbers_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi index 38e54c85a2a..68692d96f70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.NumberSchema class BaseApi(api_client.Api): + @typing.overload def _post_number_type_matches_numbers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_number_type_matches_numbers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostNumberTypeMatchesNumbersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py index 84ca8ee87d3..f1ec67c066a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_object_properties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostObjectPropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_properties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_object_properties_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi index 8890fcc4f9c..49cf10de5af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation class BaseApi(api_client.Api): + @typing.overload def _post_object_properties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_properties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostObjectPropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py index 2b0ee548440..0f7e7d9bb4f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_object_type_matches_objects_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostObjectTypeMatchesObjectsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_type_matches_objects_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_object_type_matches_objects_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi index 0220145ecb8..e9e865dfa76 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.DictSchema class BaseApi(api_client.Api): + @typing.overload def _post_object_type_matches_objects_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_type_matches_objects_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostObjectTypeMatchesObjectsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py index e73ff6bb6c8..3b9b80bedb3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostOneofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_oneof_complex_types_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi index d2638823948..3db544f5ba5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = OneofComplexTypes class BaseApi(api_client.Api): + @typing.overload def _post_oneof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostOneofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py index 3cd6520a22e..aedbff763db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_oneof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi index 5d3b6b34a0e..1391f19c4d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = Oneof class BaseApi(api_client.Api): + @typing.overload def _post_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py index 62a4284268f..e6786b96755 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostOneofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_oneof_with_base_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi index eeb2e4277be..86fe64f1c31 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = OneofWithBaseSchema class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py index dc18b181d77..dad267c332e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostOneofWithEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_oneof_with_empty_schema_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi index 93b507c78ab..ec4978a5db1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = OneofWithEmptySchema class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostOneofWithEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py index 30049110ff0..33de0488402 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_required_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostOneofWithRequiredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_required_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_oneof_with_required_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi index 330e13c653b..68d9f245e6c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = OneofWithRequired class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_required_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_required_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostOneofWithRequiredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py index e9f5746f22c..dd402511a0a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostPatternIsNotAnchoredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_is_not_anchored_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_pattern_is_not_anchored_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi index 72d9dc32bb5..f281c66bda7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = PatternIsNotAnchored class BaseApi(api_client.Api): + @typing.overload def _post_pattern_is_not_anchored_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_is_not_anchored_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py index 0aee314d2db..98896efcc7d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_pattern_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostPatternValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_pattern_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi index 014a5a449df..1a7a88bd715 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = PatternValidation class BaseApi(api_client.Api): + @typing.overload def _post_pattern_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostPatternValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostPatternValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py index 2e5a74862f3..d14bfd6750f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_properties_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_properties_with_escaped_characters_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi index 936055dcd88..03041b86b17 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters class BaseApi(api_client.Api): + @typing.overload def _post_properties_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_properties_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py index dbcef6a143c..dc1a72bf40d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_property_named_ref_that_is_not_a_reference_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi index 85dcbf63183..6635ff7ece4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference class BaseApi(api_client.Api): + @typing.overload def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py index 79a9a3d7463..0e935579162 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInAdditionalpropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_additionalproperties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_additionalproperties_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi index 8579929fbcb..042209a9bd2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInAdditionalproperties class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_additionalproperties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_additionalproperties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInAdditionalpropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py index dba5814622e..b265905c0c6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_allof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi index c2cf146102f..36fbb78c12e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInAllof class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py index 55240469c5a..91aee22f078 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_anyof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi index 15fe13e71ce..887d13e33e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInAnyof class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py index 7084e026966..140b29ffe48 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_items_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi index 92fe301b68b..b4908bda00f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInItems class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py index 67420c43809..cb7be121833 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py @@ -84,16 +84,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -144,16 +181,53 @@ class instances class PostRefInNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_request_body_oapg( body=body, @@ -167,16 +241,53 @@ def post_ref_in_not_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi index b764ab5d1aa..d1d60aa4649 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi @@ -58,16 +58,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -118,16 +155,53 @@ class BaseApi(api_client.Api): class PostRefInNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_request_body_oapg( body=body, @@ -141,16 +215,53 @@ class PostRefInNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py index bc819760be6..088c8e08786 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_oneof_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi index 2c7e0962e03..4600f45f6ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInOneof class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py index c90390d3363..b5fbae2442e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRefInPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_ref_in_property_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi index 1c8577a746c..45439f95098 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RefInProperty class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRefInPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRefInPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py index d69ac9a8f71..19859f69b65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_default_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRequiredDefaultValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_default_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_required_default_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi index 2f164dcd785..c6622fa327a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RequiredDefaultValidation class BaseApi(api_client.Api): + @typing.overload def _post_required_default_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_default_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRequiredDefaultValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py index 53032cc7358..e628ae761cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRequiredValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_required_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi index c8d141433cd..4586119f158 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RequiredValidation class BaseApi(api_client.Api): + @typing.overload def _post_required_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRequiredValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRequiredValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py index d4e6b18bf56..de4454ff752 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_with_empty_array_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostRequiredWithEmptyArrayRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_empty_array_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_required_with_empty_array_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi index 05070e8b80e..0f5a8db12af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray class BaseApi(api_client.Api): + @typing.overload def _post_required_with_empty_array_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_empty_array_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostRequiredWithEmptyArrayRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py index 92d5b605383..8a936d7633d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py @@ -87,16 +87,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -147,16 +184,53 @@ class instances class PostRequiredWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_request_body_oapg( body=body, @@ -170,16 +244,53 @@ def post_required_with_escaped_characters_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi index ddc024fd9d0..b2ecce3c1df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi @@ -61,16 +61,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_required_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -121,16 +158,53 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_request_body_oapg( body=body, @@ -144,16 +218,53 @@ class PostRequiredWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py index 1b16f9380ec..fa0fd6dcacf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_simple_enum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostSimpleEnumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_simple_enum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_simple_enum_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi index 7bb345e5f68..696756f924d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = SimpleEnumValidation class BaseApi(api_client.Api): + @typing.overload def _post_simple_enum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_simple_enum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostSimpleEnumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py index 70baebb1f67..568db3cb411 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py @@ -57,16 +57,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_string_type_matches_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -117,16 +154,53 @@ class instances class PostStringTypeMatchesStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_string_type_matches_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_request_body_oapg( body=body, @@ -140,16 +214,53 @@ def post_string_type_matches_strings_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi index 50d8f7f9f3b..6cba2f61219 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi @@ -31,16 +31,53 @@ SchemaForRequestBodyApplicationJson = schemas.StrSchema class BaseApi(api_client.Api): + @typing.overload def _post_string_type_matches_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,16 +128,53 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_string_type_matches_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_request_body_oapg( body=body, @@ -114,16 +188,53 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py index 19e0a5ce46e..de79a587e65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_req class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi index b0d69d7aa92..421f2f5a8d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePro class BaseApi(api_client.Api): + @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(Ba class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py index fd7400f1110..ac33bebb41b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostUniqueitemsFalseValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_false_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_uniqueitems_false_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi index 03457ae0a3a..024af22e133 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_false_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_false_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py index cf364bf948f..0b80c4c1ef0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class PostUniqueitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_request_body_oapg( body=body, @@ -142,16 +216,53 @@ def post_uniqueitems_validation_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi index dfe7f9041cf..d751a313db6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = UniqueitemsValidation class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_request_body_oapg( body=body, @@ -116,16 +190,53 @@ class PostUniqueitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py index fe898546b5a..b033b285d9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostUriFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_uri_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi index 7f3fa41ba21..9a3090e75ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_uri_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostUriFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostUriFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py index 49bd115c0c5..b3d90fb1107 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_reference_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostUriReferenceFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_reference_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_uri_reference_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi index a7fe122f3a1..5db1cd88455 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_uri_reference_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_reference_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostUriReferenceFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py index aef3129629a..ca22c4472e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py @@ -79,16 +79,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_template_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -139,16 +176,53 @@ class instances class PostUriTemplateFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_template_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_request_body_oapg( body=body, @@ -162,16 +236,53 @@ def post_uri_template_format_request_body( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi index e6ff0166fa6..d9b42d9824e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi @@ -53,16 +53,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _post_uri_template_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -113,16 +150,53 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_template_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_request_body_oapg( body=body, @@ -136,16 +210,53 @@ class PostUriTemplateFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_request_body_oapg( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py index d483b56496f..79cd96eaa47 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_additionalproperties_allows_a_schema_which_should_validate_response_bod class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi index db7eb165439..c10138897dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForCon class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py index 43d6a536f11..170295a207c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_additionalproperties_are_allowed_by_default_response_body_for_content_t class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi index 689d638523c..6fd11878f63 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(Bas class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py index 27943fe18ad..5df4832acdc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_additionalproperties_can_exist_by_itself_response_body_for_content_type class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi index 73cab792eb7..cacc30b4ec6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py index bd2a1a7f0d3..4beea87ddd9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_additionalproperties_should_not_look_in_applicators_response_body_for_c class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi index f5bddfa9488..001a212e902 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTy class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py index ed6ee20d1ed..7f352bb82ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_combined_with_anyof_oneof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi index 28401bd1cd3..6933a1eaa38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py index bb8cfc8a815..abdde0aefc2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi index d04ed5d067a..f2375120ddc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py index 3503c97dde8..3dff816eac0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_simple_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_simple_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_simple_types_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi index 7030b29ba8f..abf555b2165 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_simple_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_simple_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py index 6e77ac14228..cfc4c415482 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_with_base_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi index dfbabc6c18f..00646e0cb5a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py index edbc007e879..1146c3d8e40 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_with_one_empty_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi index d189cb26e51..8144c6c2849 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py index 389f9b84206..730e679c333 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_with_the_first_empty_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi index b467287f0a7..207af289107 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py index 51c81cc92aa..48ffa3f8eff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_with_the_last_empty_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi index f502a2a7ec2..4f831c0e5fd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py index 3abf1066253..61d180aa30e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_two_empty_schemas_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_allof_with_two_empty_schemas_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi index 43650cf1372..d844cd429a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_allof_with_two_empty_schemas_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py index 23c53bc9e66..8fed0a0fd91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_complex_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_anyof_complex_types_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi index 507becb0fc7..74c9bc00f2b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_anyof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_complex_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py index b12f52012a7..4d3a69fd38d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_anyof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi index 9b227c718c2..9575d6926b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py index 4d47659f0bd..b4436541178 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_anyof_with_base_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi index f1c8912f7b2..1ee9d5d6a20 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py index 5da32795327..0c35eb17465 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_anyof_with_one_empty_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi index e59f582c862..13693713510 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_anyof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py index 1414fa62e86..fec3e5cbd79 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_array_type_matches_arrays_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_array_type_matches_arrays_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi index d5676f03581..32607edc079 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_array_type_matches_arrays_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py index a95f03b4e47..2675e1fcaf7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_boolean_type_matches_booleans_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_boolean_type_matches_booleans_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi index 8b5b589c464..d5a99c51eac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_boolean_type_matches_booleans_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py index 41034fa697c..5077d52ce35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_int_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostByIntResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_int_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_by_int_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi index 61b3d81b320..ace35a806e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_by_int_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostByIntResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_int_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostByIntResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py index e904ed1a382..4c44544d360 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostByNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_number_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_by_number_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi index 3d9ebcd6a05..b16b61443cc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_by_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostByNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_number_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostByNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py index 2c4392f1e14..26b0ebbd898 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_by_small_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostBySmallNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_small_number_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_by_small_number_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi index 62adbca6a88..0a2d45e11c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_by_small_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostBySmallNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_by_small_number_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostBySmallNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py index f2376a2df1a..28b52a589eb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py @@ -79,15 +79,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_date_time_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -128,15 +162,49 @@ class instances class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_date_time_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -149,15 +217,49 @@ def post_date_time_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi index 18588164a4e..7086273896f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi @@ -56,15 +56,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_date_time_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class BaseApi(api_client.Api): class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_date_time_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py index a87120ac476..ef42998135c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_email_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostEmailFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_email_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_email_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi index 4429c79bc49..a8a5bd26ce4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_email_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostEmailFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_email_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostEmailFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py index a87fc39eb2c..b50435634c1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with0_does_not_match_false_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enum_with0_does_not_match_false_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi index 4fb57b1ddef..69f3c201cac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with0_does_not_match_false_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py index d5b4bde7a65..a3e1d39e4e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with1_does_not_match_true_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enum_with1_does_not_match_true_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi index 9f60984e680..6f4a6a9e51f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with1_does_not_match_true_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py index b37e49aabcd..5591f72ddd4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enum_with_escaped_characters_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi index cdc047c43ee..7f793671745 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py index 98ebe09f381..404dc976a8c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_false_does_not_match0_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enum_with_false_does_not_match0_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi index ce05cb3a3bf..221f35e425f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_false_does_not_match0_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py index 159ce75a12f..383ffc861f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_true_does_not_match1_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enum_with_true_does_not_match1_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi index 83e53e24ef9..87a37e4b716 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enum_with_true_does_not_match1_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py index bc9fca72096..66e3879c976 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_enums_in_properties_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enums_in_properties_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_enums_in_properties_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi index 3e30e6e6038..76d53a7c5dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_enums_in_properties_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_enums_in_properties_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py index fad8e99f1ca..c508c5d1917 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_forbidden_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_forbidden_property_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_forbidden_property_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi index 7d3e8754558..43d98ca93e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_forbidden_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_forbidden_property_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py index 188dcc891db..1dc4447b107 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_hostname_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostHostnameFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_hostname_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_hostname_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi index d1d8399b74a..fcb2ee8f84d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_hostname_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostHostnameFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_hostname_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostHostnameFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py index 70954d90690..64c7e0d1026 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_integer_type_matches_integers_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_integer_type_matches_integers_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi index de78604fa03..7b099fa47db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_integer_type_matches_integers_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py index 02dc4227f64..ad1bcad7e9f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_invalid_instance_should_not_raise_error_when_float_division_inf_respons class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi index 28222ab8884..bd2685dfda3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForC class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py index 35d6dd815ff..603ebb1e4ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_string_value_for_default_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_invalid_string_value_for_default_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi index 98e0646ddd1..f8a87064030 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_invalid_string_value_for_default_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py index dacd310a9dc..a86b59bd751 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ipv4_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostIpv4FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv4_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_ipv4_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi index 25cfffb07b7..4c1113dc431 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ipv4_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostIpv4FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv4_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostIpv4FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py index 435bb55a508..e9deabfdf77 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ipv6_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostIpv6FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv6_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_ipv6_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi index 5d0ca450c00..92e9df85a55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ipv6_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostIpv6FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ipv6_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostIpv6FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py index 4bca2876953..20f737da2f7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_json_pointer_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_json_pointer_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_json_pointer_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi index ee0046c4b61..456df5b6b7d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_json_pointer_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_json_pointer_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py index b9415262a1b..7a2b41e9a06 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaximumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maximum_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi index af9bf3e4498..ae35d17df62 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaximumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaximumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py index 7ae8eea54d1..1a622cea148 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maximum_validation_with_unsigned_integer_response_body_for_content_type class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi index f9b7b2d422c..4a1b43696a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py index 5a63caab151..d926294cac0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maxitems_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi index 8a6f7dd62a4..c4f7b4ae064 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maxitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py index b6728ece2dc..55d9c2d7561 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxlength_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maxlength_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi index 012642e4f12..eb8d213d1cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maxlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxlength_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py index 9cd2ab6c996..474913ade99 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maxproperties0_means_the_object_is_empty_response_body_for_content_type class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi index 62373744f4d..0288531c7dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py index 1e23926f48e..a29e512ff97 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_maxproperties_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi index 3e70643f892..229c57eb490 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_maxproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_maxproperties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py index 83e3cf4aa37..3d4afee4a9a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMinimumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_minimum_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi index 79c039afac8..4a2ec3e8d83 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMinimumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMinimumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py index 2576206d66e..4636ac6d9fb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_minimum_validation_with_signed_integer_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi index 6b009382922..be5066d9bf6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi) class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py index c11c502c996..bba1da0324c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_minitems_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi index 963b8250761..1ce5ef50280 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_minitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py index 1df42fe4370..35e4c90493a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minlength_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_minlength_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi index e2be043aa1f..553284cae17 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_minlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minlength_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py index f0c3b54b66f..9c940301206 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_minproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minproperties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_minproperties_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi index 9f96ff8fc18..8e1f01edf9e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_minproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_minproperties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py index 9c70aa0da91..e3ef5b55765 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_nested_allof_to_check_validation_semantics_response_body_for_content_ty class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi index c943fe0c343..fa9d6251fee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py index ef2dfc15ad8..51348d3e69a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_nested_anyof_to_check_validation_semantics_response_body_for_content_ty class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 57f3c654b5e..2df89f4201a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py index 026c086eae7..387b471e433 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostNestedItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_items_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_nested_items_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi index cd89ba08e85..eb1c51a3735 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_nested_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostNestedItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_items_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostNestedItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py index 741442c170a..1cc957ff963 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_nested_oneof_to_check_validation_semantics_response_body_for_content_ty class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi index cc87b6112f3..25757244fff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py index 13c61e239ae..70c43e63840 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py @@ -127,15 +127,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -176,15 +210,49 @@ class instances class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_more_complex_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -197,15 +265,49 @@ def post_not_more_complex_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi index fff2e73fd7b..53475eefbf5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi @@ -104,15 +104,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -153,15 +187,49 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_more_complex_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -174,15 +242,49 @@ class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py index c77e6647738..78ad46a0c00 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_not_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi index 5f30622b8e8..f95bf49e5b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_not_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py index 2c3c024b324..b11153b7e8b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nul_characters_in_strings_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_nul_characters_in_strings_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi index c16dc293e2b..5761b40346a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_nul_characters_in_strings_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py index b715f683198..b11f753fe3f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_null_type_matches_only_the_null_object_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi index 89cde51ed05..c2fa7c00f9e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py index 271b13e2fe3..b9c1eae1016 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_number_type_matches_numbers_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_number_type_matches_numbers_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi index e945e45b29f..bc041b47f7b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_number_type_matches_numbers_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py index 475dc9ab22b..1f9dec4833e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_object_properties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_properties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_object_properties_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi index c58758a9b33..e6fa58324ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_object_properties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_properties_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py index 5cc62d65ea3..0439c363439 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_type_matches_objects_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_object_type_matches_objects_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi index 6a15b0be4a3..e57457b3d0c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_object_type_matches_objects_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py index 495b4e83a34..1b75e9a2d10 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_complex_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_oneof_complex_types_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi index 1de9c2812e4..ee127407ac6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_oneof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_complex_types_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py index 0eef467c0c6..f304253d7d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_oneof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi index 3c51bc63fac..3d22098194d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py index fbdb23c28b2..3e1559e669e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_oneof_with_base_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi index 20a5b3d90e6..12b3aa3e241 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py index 13d5070129a..f0140822fdb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_oneof_with_empty_schema_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi index 48c41793c51..a90c08c2aa6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_empty_schema_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py index 75138d36053..cdf1b2b07d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_required_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_required_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_oneof_with_required_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi index ca3ec89b501..658698af450 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_oneof_with_required_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_oneof_with_required_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py index 9379092884f..3e5382f3e2d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_is_not_anchored_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_pattern_is_not_anchored_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi index 97b297ceac9..7f2d7ffa603 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_is_not_anchored_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py index cac793efa5a..d1261cf76f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_pattern_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostPatternValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_pattern_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi index 7b04aed8395..41e3fb096ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_pattern_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostPatternValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_pattern_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostPatternValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py index 8f5b60de978..7287b97fbac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_properties_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_properties_with_escaped_characters_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi index ea8e9df1a04..2c7cee7c45e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_properties_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py index 211b708f84f..aba94ea5df2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_property_named_ref_that_is_not_a_reference_response_body_for_content_ty class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi index 661d27604ef..068b9c1da1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py index 3646ddfac53..6427e2635a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_additionalproperties_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_additionalproperties_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi index 2d2b7b1896b..841019511be 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_additionalproperties_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py index ba246674237..4e70ccc5fd5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_allof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_allof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi index 5056c8c3d8b..4536cdff104 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_allof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py index e9c7e40f86b..f67c543c0d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_anyof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_anyof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi index 7979d632da5..0688bf43812 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_anyof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py index aba91337cb9..09696f52876 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_items_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_items_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi index 556bcc20599..fe9f3cc550e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_items_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py index bc13e0d26f7..b9b9bf330fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py @@ -83,15 +83,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,15 +166,49 @@ class instances class PostRefInNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_not_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -153,15 +221,49 @@ def post_ref_in_not_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi index 41a03ddcec4..cc213ac51ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi @@ -60,15 +60,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -109,15 +143,49 @@ class BaseApi(api_client.Api): class PostRefInNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_not_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -130,15 +198,49 @@ class PostRefInNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py index 4423ea94496..f1d2d0f1a1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_oneof_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi index f86ae484464..e32da93c677 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_oneof_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py index a9eccf664bd..3a6963e746b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRefInPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_property_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_ref_in_property_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi index 220be3be534..5020df63036 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_ref_in_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRefInPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_ref_in_property_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRefInPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py index f7784ead0f1..83a33b78456 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_default_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_default_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_required_default_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi index 33f98298747..07a76809a7c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_required_default_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_default_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py index 15344cdfa1b..f4c5168635b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRequiredValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_required_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi index e0c69bcc704..2585a2d80c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_required_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRequiredValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRequiredValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py index 545abfd36d1..ed0a87fb58d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_with_empty_array_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_empty_array_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_required_with_empty_array_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi index 2eed312b7b9..26a452eec65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_required_with_empty_array_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_empty_array_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py index 7cea48d8b96..e2554a6e233 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py @@ -86,15 +86,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -135,15 +169,49 @@ class instances class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -156,15 +224,49 @@ def post_required_with_escaped_characters_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi index f9918ddfeaf..68fd4446022 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi @@ -63,15 +63,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -112,15 +146,49 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_required_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -133,15 +201,49 @@ class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py index 0b138868491..0206b819b8e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_simple_enum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_simple_enum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_simple_enum_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi index cba5ecd2080..1a1de381be4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_simple_enum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_simple_enum_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py index 24f9a28f289..089fe43ed81 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py @@ -56,15 +56,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -105,15 +139,49 @@ class instances class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_string_type_matches_strings_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -126,15 +194,49 @@ def post_string_type_matches_strings_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi index 29eee86cd66..16f7e041b25 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -82,15 +116,49 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_string_type_matches_strings_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -103,15 +171,49 @@ class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py index 23de1c70c5f..d805dc414e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_res class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi index e982ab5f7de..646041ce92b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyFo class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py index 32ec15a6bf7..083f2900d11 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_false_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_uniqueitems_false_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi index 6b02a890071..f2ac49f5185 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_false_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py index 531cab800b8..76ae51d625d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -107,15 +141,49 @@ class instances class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def post_uniqueitems_validation_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi index 642059237c3..5128617a445 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -84,15 +118,49 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uniqueitems_validation_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -105,15 +173,49 @@ class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py index 252fb5f0847..253bea439d6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostUriFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_uri_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi index 718073cf867..e2d3633915b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_uri_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostUriFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostUriFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py index d160addbecc..ff0c98222e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_reference_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_reference_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_uri_reference_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi index 09e8886136d..909fdaccc97 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_uri_reference_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_reference_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py index b418915fbaf..aa812e3f0f0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py @@ -78,15 +78,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _post_uri_template_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -127,15 +161,49 @@ class instances class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_template_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -148,15 +216,49 @@ def post_uri_template_format_response_body_for_content_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi index 7e04b30ce5d..803bdd58b6c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi @@ -55,15 +55,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _post_uri_template_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -104,15 +138,49 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def post_uri_template_format_response_body_for_content_types( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, @@ -125,15 +193,49 @@ class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py index 800c45e3ca9..4d023766a7f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py @@ -69,9 +69,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _call_123_test_special_tags_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -79,7 +104,22 @@ def _call_123_test_special_tags_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test special tags @@ -134,9 +174,34 @@ class instances class Call123TestSpecialTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def call_123_test_special_tags( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -144,7 +209,22 @@ def call_123_test_special_tags( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._call_123_test_special_tags_oapg( body=body, @@ -159,9 +239,48 @@ def call_123_test_special_tags( class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -169,7 +288,8 @@ def patch( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._call_123_test_special_tags_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi index dc0216a43f1..983cfd0b66d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _call_123_test_special_tags_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test special tags @@ -102,9 +142,34 @@ class BaseApi(api_client.Api): class Call123TestSpecialTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def call_123_test_special_tags( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -112,7 +177,22 @@ class Call123TestSpecialTags(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._call_123_test_special_tags_oapg( body=body, @@ -127,9 +207,48 @@ class Call123TestSpecialTags(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -137,7 +256,8 @@ class ApiForpatch(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._call_123_test_special_tags_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py index 1d7550bf636..6ad794268a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py @@ -134,15 +134,51 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _group_parameters_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _group_parameters_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Fake endpoint to test group parameters (optional) @@ -209,15 +245,51 @@ class instances class GroupParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def group_parameters( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def group_parameters( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._group_parameters_oapg( query_params=query_params, @@ -231,15 +303,51 @@ def group_parameters( class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._group_parameters_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi index 7c79e3509df..ff95fcd752e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi @@ -37,15 +37,51 @@ BooleanGroupSchema = schemas.BoolSchema class BaseApi(api_client.Api): + @typing.overload def _group_parameters_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _group_parameters_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Fake endpoint to test group parameters (optional) @@ -112,15 +148,51 @@ class BaseApi(api_client.Api): class GroupParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def group_parameters( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def group_parameters( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._group_parameters_oapg( query_params=query_params, @@ -134,15 +206,51 @@ class GroupParameters(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._group_parameters_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py index d69fbec4c6b..6319720ebcd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py @@ -453,9 +453,36 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _enum_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -463,7 +490,22 @@ def _enum_parameters_oapg( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test enum parameters @@ -540,9 +582,50 @@ class instances class EnumParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def enum_parameters( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -550,7 +633,8 @@ def enum_parameters( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._enum_parameters_oapg( body=body, @@ -566,9 +650,50 @@ def enum_parameters( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -576,7 +701,8 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._enum_parameters_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi index 7db64856798..09f12d6e2e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi @@ -280,9 +280,36 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( class BaseApi(api_client.Api): + @typing.overload def _enum_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -290,7 +317,22 @@ class BaseApi(api_client.Api): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _enum_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test enum parameters @@ -367,9 +409,50 @@ class BaseApi(api_client.Api): class EnumParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def enum_parameters( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def enum_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -377,7 +460,8 @@ class EnumParameters(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._enum_parameters_oapg( body=body, @@ -393,9 +477,50 @@ class EnumParameters(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', @@ -403,7 +528,8 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._enum_parameters_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py index cb0a1d3c5aa..b499871b8bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py @@ -69,9 +69,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _client_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -79,7 +104,22 @@ def _client_model_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test \"client\" model @@ -134,9 +174,34 @@ class instances class ClientModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def client_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -144,7 +209,22 @@ def client_model( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._client_model_oapg( body=body, @@ -159,9 +239,48 @@ def client_model( class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -169,7 +288,8 @@ def patch( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._client_model_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi index 9513e0bc08d..80ae3f14f26 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _client_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test \"client\" model @@ -102,9 +142,34 @@ class BaseApi(api_client.Api): class ClientModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def client_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -112,7 +177,22 @@ class ClientModel(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._client_model_oapg( body=body, @@ -127,9 +207,48 @@ class ClientModel(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -137,7 +256,8 @@ class ApiForpatch(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._client_model_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py index b732e5d6100..bfe96b8bddd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py @@ -340,15 +340,51 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _endpoint_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -399,15 +435,51 @@ class instances class EndpointParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def endpoint_parameters( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._endpoint_parameters_oapg( body=body, @@ -421,15 +493,51 @@ def endpoint_parameters( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._endpoint_parameters_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi index e6ee494da3e..984134a7b20 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi @@ -259,15 +259,51 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( class BaseApi(api_client.Api): + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _endpoint_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -318,15 +354,51 @@ class BaseApi(api_client.Api): class EndpointParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def endpoint_parameters( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def endpoint_parameters( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._endpoint_parameters_oapg( body=body, @@ -340,15 +412,51 @@ class EndpointParameters(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._endpoint_parameters_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py index c1ee6c01440..bb0a3cc2ba0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _additional_properties_with_array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _additional_properties_with_array_of_enums_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Additional Properties with Array of Enums @@ -131,9 +171,34 @@ class instances class AdditionalPropertiesWithArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def additional_properties_with_array_of_enums( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -141,7 +206,22 @@ def additional_properties_with_array_of_enums( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._additional_properties_with_array_of_enums_oapg( body=body, @@ -156,9 +236,48 @@ def additional_properties_with_array_of_enums( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -166,7 +285,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._additional_properties_with_array_of_enums_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi index 297cb4db509..726686df0c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _additional_properties_with_array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _additional_properties_with_array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Additional Properties with Array of Enums @@ -100,9 +140,34 @@ class BaseApi(api_client.Api): class AdditionalPropertiesWithArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def additional_properties_with_array_of_enums( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -110,7 +175,22 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def additional_properties_with_array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._additional_properties_with_array_of_enums_oapg( body=body, @@ -125,9 +205,48 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -135,7 +254,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._additional_properties_with_array_of_enums_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py index c6174989d12..1f928221762 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py @@ -59,16 +59,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _body_with_file_schema_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -119,16 +156,53 @@ class instances class BodyWithFileSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def body_with_file_schema( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_file_schema_oapg( body=body, @@ -142,16 +216,53 @@ def body_with_file_schema( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_file_schema_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi index d5f6d24f0a7..9ebeca230f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = FileSchemaTestClass class BaseApi(api_client.Api): + @typing.overload def _body_with_file_schema_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -93,16 +130,53 @@ class BaseApi(api_client.Api): class BodyWithFileSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def body_with_file_schema( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_file_schema_oapg( body=body, @@ -116,16 +190,53 @@ class BodyWithFileSchema(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_file_schema_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py index 3f34b578247..9f47253160b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py @@ -86,9 +86,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _body_with_query_params_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -96,7 +121,22 @@ def _body_with_query_params_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -161,9 +201,34 @@ class instances class BodyWithQueryParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def body_with_query_params( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -171,7 +236,22 @@ def body_with_query_params( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_query_params_oapg( body=body, @@ -186,9 +266,48 @@ def body_with_query_params( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -196,7 +315,8 @@ def put( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_query_params_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi index 43c58164943..27a2b6ce294 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi @@ -35,9 +35,34 @@ SchemaForRequestBodyApplicationJson = User class BaseApi(api_client.Api): + @typing.overload def _body_with_query_params_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -45,7 +70,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -110,9 +150,34 @@ class BaseApi(api_client.Api): class BodyWithQueryParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def body_with_query_params( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -120,7 +185,22 @@ class BodyWithQueryParams(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_query_params_oapg( body=body, @@ -135,9 +215,48 @@ class BodyWithQueryParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, @@ -145,7 +264,8 @@ class ApiForput(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._body_with_query_params_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py index 1ecaf9befac..3f08139e801 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py @@ -90,15 +90,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _case_sensitive_params_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _case_sensitive_params_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -149,15 +183,49 @@ class instances class CaseSensitiveParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def case_sensitive_params( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._case_sensitive_params_oapg( query_params=query_params, @@ -170,15 +238,49 @@ def case_sensitive_params( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._case_sensitive_params_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi index b11af7bfdd1..e73813f6e6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi @@ -32,15 +32,49 @@ SomeVarSchema = schemas.StrSchema class BaseApi(api_client.Api): + @typing.overload def _case_sensitive_params_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _case_sensitive_params_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -91,15 +125,49 @@ class BaseApi(api_client.Api): class CaseSensitiveParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def case_sensitive_params( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._case_sensitive_params_oapg( query_params=query_params, @@ -112,15 +180,49 @@ class CaseSensitiveParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._case_sensitive_params_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py index adec01e9aec..330be000103 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py @@ -72,9 +72,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _classname_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -82,7 +107,22 @@ def _classname_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test class name in snake case @@ -138,9 +178,34 @@ class instances class Classname(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def classname( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -148,7 +213,22 @@ def classname( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._classname_oapg( body=body, @@ -163,9 +243,48 @@ def classname( class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -173,7 +292,8 @@ def patch( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._classname_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi index 8381fa1a81c..a10947c1e90 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _classname_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ To test class name in snake case @@ -103,9 +143,34 @@ class BaseApi(api_client.Api): class Classname(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def classname( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -113,7 +178,22 @@ class Classname(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._classname_oapg( body=body, @@ -128,9 +208,48 @@ class Classname(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -138,7 +257,8 @@ class ApiForpatch(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._classname_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py index 3cc5cf64c1b..3a3dc9c12a2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py @@ -84,8 +84,42 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _delete_coffee_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_coffee_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -93,7 +127,8 @@ def _delete_coffee_oapg( ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete coffee @@ -147,8 +182,29 @@ class instances class DeleteCoffee(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def delete_coffee( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -156,7 +212,21 @@ def delete_coffee( ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_coffee_oapg( path_params=path_params, @@ -169,8 +239,42 @@ def delete_coffee( class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -178,7 +282,8 @@ def delete( ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_coffee_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi index d7522ad66fb..35ebd2bdd53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi @@ -30,8 +30,42 @@ IdSchema = schemas.StrSchema class BaseApi(api_client.Api): + @typing.overload def _delete_coffee_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_coffee_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -39,7 +73,8 @@ class BaseApi(api_client.Api): ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete coffee @@ -93,8 +128,29 @@ class BaseApi(api_client.Api): class DeleteCoffee(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def delete_coffee( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -102,7 +158,21 @@ class DeleteCoffee(BaseApi): ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_coffee_oapg( path_params=path_params, @@ -115,8 +185,42 @@ class DeleteCoffee(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -124,7 +228,8 @@ class ApiFordelete(BaseApi): ) -> typing.Union[ ApiResponseFor200, ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_coffee_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py index 956d347dbd5..33d0ce01dc3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py @@ -58,15 +58,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _fake_health_get_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _fake_health_get_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Health check endpoint @@ -108,15 +142,49 @@ class instances class FakeHealthGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def fake_health_get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._fake_health_get_oapg( accept_content_types=accept_content_types, @@ -129,15 +197,49 @@ def fake_health_get( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._fake_health_get_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi index 3ba8d20c2a9..6b23b0676cb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi @@ -35,15 +35,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _fake_health_get_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _fake_health_get_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Health check endpoint @@ -85,15 +119,49 @@ class BaseApi(api_client.Api): class FakeHealthGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def fake_health_get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._fake_health_get_oapg( accept_content_types=accept_content_types, @@ -106,15 +174,49 @@ class FakeHealthGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._fake_health_get_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py index e09fc626a53..4d30a1cc313 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py @@ -85,16 +85,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _inline_additional_properties_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ test inline additionalProperties @@ -146,16 +183,53 @@ class instances class InlineAdditionalProperties(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def inline_additional_properties( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_additional_properties_oapg( body=body, @@ -169,16 +243,53 @@ def inline_additional_properties( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_additional_properties_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi index 9312b60c9d8..f01ad736f7d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi @@ -59,16 +59,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _inline_additional_properties_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ test inline additionalProperties @@ -120,16 +157,53 @@ class BaseApi(api_client.Api): class InlineAdditionalProperties(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def inline_additional_properties( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_additional_properties_oapg( body=body, @@ -143,16 +217,53 @@ class InlineAdditionalProperties(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_additional_properties_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py index 43c746f71e0..1d16d405e48 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py @@ -519,9 +519,51 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _inline_composition_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -530,7 +572,8 @@ def _inline_composition_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ testing composed schemas at inline locations @@ -598,9 +641,36 @@ class instances class InlineComposition(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def inline_composition( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -609,7 +679,23 @@ def inline_composition( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_composition_oapg( body=body, @@ -625,9 +711,51 @@ def inline_composition( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -636,7 +764,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_composition_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi index ef77ebb2458..962ba1f5b08 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi @@ -434,9 +434,51 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _inline_composition_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _inline_composition_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -445,7 +487,8 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ testing composed schemas at inline locations @@ -513,9 +556,36 @@ class BaseApi(api_client.Api): class InlineComposition(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def inline_composition( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -524,7 +594,23 @@ class InlineComposition(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def inline_composition( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_composition_oapg( body=body, @@ -540,9 +626,51 @@ class InlineComposition(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -551,7 +679,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._inline_composition_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py index 69d6a915813..296482bf31a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py @@ -122,16 +122,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _json_form_data_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ test json serialization of form data @@ -181,16 +218,53 @@ class instances class JsonFormData(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_form_data( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_form_data_oapg( body=body, @@ -204,16 +278,53 @@ def json_form_data( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_form_data_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi index 71c3412515e..034f17b5d17 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi @@ -97,16 +97,53 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( class BaseApi(api_client.Api): + @typing.overload def _json_form_data_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_form_data_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ test json serialization of form data @@ -156,16 +193,53 @@ class BaseApi(api_client.Api): class JsonFormData(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_form_data( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_form_data( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_form_data_oapg( body=body, @@ -179,16 +253,53 @@ class JsonFormData(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_form_data_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py index 00b8cf45421..9c119c576e3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py @@ -58,16 +58,53 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _json_patch_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ json patch @@ -117,16 +154,53 @@ class instances class JsonPatch(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_patch_oapg( body=body, @@ -140,16 +214,53 @@ def json_patch( class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_patch_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi index 65d08b9962d..88c207a8592 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest class BaseApi(api_client.Api): + @typing.overload def _json_patch_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_patch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ json patch @@ -92,16 +129,53 @@ class BaseApi(api_client.Api): class JsonPatch(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_patch_oapg( body=body, @@ -115,16 +189,53 @@ class JsonPatch(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json-patch+json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson,schemas.Unset] = schemas.unset, content_type: str = 'application/json-patch+json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_patch_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py index 9f003807d23..fedda00ab1a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py @@ -66,9 +66,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _json_with_charset_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -76,7 +101,22 @@ def _json_with_charset_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ json with charset tx and rx @@ -129,9 +169,34 @@ class instances class JsonWithCharset(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_with_charset( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -139,7 +204,22 @@ def json_with_charset( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_with_charset_oapg( body=body, @@ -154,9 +234,48 @@ def json_with_charset( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -164,7 +283,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_with_charset_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi index a2700e06277..0fb73b3907e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi @@ -35,9 +35,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _json_with_charset_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -45,7 +70,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _json_with_charset_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ json with charset tx and rx @@ -98,9 +138,34 @@ class BaseApi(api_client.Api): class JsonWithCharset(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def json_with_charset( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -108,7 +173,22 @@ class JsonWithCharset(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def json_with_charset( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_with_charset_oapg( body=body, @@ -123,9 +203,48 @@ class JsonWithCharset(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + content_type: str = 'application/json; charset=utf-8', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, content_type: str = 'application/json; charset=utf-8', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -133,7 +252,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._json_with_charset_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py index 36d5018988b..4f99e88c2aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py @@ -120,15 +120,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _object_in_query_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _object_in_query_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ user list @@ -178,15 +212,49 @@ class instances class ObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def object_in_query( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_in_query_oapg( query_params=query_params, @@ -199,15 +267,49 @@ def object_in_query( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_in_query_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi index 3933c00010d..60f21ccf5d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi @@ -79,15 +79,49 @@ class MapBeanSchema( class BaseApi(api_client.Api): + @typing.overload def _object_in_query_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _object_in_query_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ user list @@ -137,15 +171,49 @@ class BaseApi(api_client.Api): class ObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def object_in_query( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_in_query_oapg( query_params=query_params, @@ -158,15 +226,49 @@ class ObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_in_query_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py index c0c42ad3372..6c1b57e69f5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py @@ -286,9 +286,42 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _parameter_collisions_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -300,7 +333,26 @@ def _parameter_collisions_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ parameter collision case @@ -402,9 +454,60 @@ class instances class ParameterCollisions(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def parameter_collisions( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -416,7 +519,8 @@ def parameter_collisions( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._parameter_collisions_oapg( body=body, @@ -435,9 +539,60 @@ def parameter_collisions( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -449,7 +604,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._parameter_collisions_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi index f87b6b9b1d0..ee580c7b89d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi @@ -58,9 +58,42 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _parameter_collisions_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -72,7 +105,26 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _parameter_collisions_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ parameter collision case @@ -174,9 +226,60 @@ class BaseApi(api_client.Api): class ParameterCollisions(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def parameter_collisions( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def parameter_collisions( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -188,7 +291,8 @@ class ParameterCollisions(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._parameter_collisions_oapg( body=body, @@ -207,9 +311,60 @@ class ParameterCollisions(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -221,7 +376,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._parameter_collisions_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py index ef60c3b93d8..d71e9be464b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py @@ -161,9 +161,51 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_file_with_required_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -172,7 +214,8 @@ def _upload_file_with_required_file_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads an image (required) @@ -240,9 +283,36 @@ class instances class UploadFileWithRequiredFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_file_with_required_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -251,7 +321,23 @@ def upload_file_with_required_file( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_with_required_file_oapg( body=body, @@ -267,9 +353,51 @@ def upload_file_with_required_file( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -278,7 +406,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_with_required_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi index e9c08258020..5cfd51d0577 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi @@ -103,9 +103,51 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_file_with_required_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -114,7 +156,8 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads an image (required) @@ -182,9 +225,36 @@ class BaseApi(api_client.Api): class UploadFileWithRequiredFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_file_with_required_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -193,7 +263,23 @@ class UploadFileWithRequiredFile(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_file_with_required_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_with_required_file_oapg( body=body, @@ -209,9 +295,51 @@ class UploadFileWithRequiredFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -220,7 +348,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_with_required_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py index ae601b1781d..5e64165aea6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py @@ -73,15 +73,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _ref_object_in_query_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _ref_object_in_query_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ user list @@ -131,15 +165,49 @@ class instances class RefObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def ref_object_in_query( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._ref_object_in_query_oapg( query_params=query_params, @@ -152,15 +220,49 @@ def ref_object_in_query( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._ref_object_in_query_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi index 272d34c102d..4ec3dc82e36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi @@ -32,15 +32,49 @@ MapBeanSchema = Foo class BaseApi(api_client.Api): + @typing.overload def _ref_object_in_query_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _ref_object_in_query_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ user list @@ -90,15 +124,49 @@ class BaseApi(api_client.Api): class RefObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def ref_object_in_query( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._ref_object_in_query_oapg( query_params=query_params, @@ -111,15 +179,49 @@ class RefObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._ref_object_in_query_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py index fd14aeb19c8..f4ffd0fd672 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _array_of_enums_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Array of Enums @@ -131,9 +171,34 @@ class instances class ArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def array_of_enums( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -141,7 +206,22 @@ def array_of_enums( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_of_enums_oapg( body=body, @@ -156,9 +236,48 @@ def array_of_enums( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -166,7 +285,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_of_enums_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi index f0a68485d92..950ab970e1b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _array_of_enums_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Array of Enums @@ -100,9 +140,34 @@ class BaseApi(api_client.Api): class ArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def array_of_enums( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -110,7 +175,22 @@ class ArrayOfEnums(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def array_of_enums( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_of_enums_oapg( body=body, @@ -125,9 +205,48 @@ class ArrayOfEnums(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -135,7 +254,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_of_enums_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py index 69be2acbc86..91bc16eb4a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _array_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _array_model_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -130,9 +170,34 @@ class instances class ArrayModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def array_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -140,7 +205,22 @@ def array_model( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_model_oapg( body=body, @@ -155,9 +235,48 @@ def array_model( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -165,7 +284,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_model_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi index c0efa3e3939..16a075236ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _array_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _array_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -99,9 +139,34 @@ class BaseApi(api_client.Api): class ArrayModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def array_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,7 +174,22 @@ class ArrayModel(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def array_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_model_oapg( body=body, @@ -124,9 +204,48 @@ class ArrayModel(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +253,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._array_model_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py index 4341a21a723..b68295a2fa0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py @@ -66,9 +66,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _boolean_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -76,7 +101,22 @@ def _boolean_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -128,9 +168,34 @@ class instances class Boolean(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def boolean( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -138,7 +203,22 @@ def boolean( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._boolean_oapg( body=body, @@ -153,9 +233,48 @@ def boolean( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -163,7 +282,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._boolean_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi index bb75c710c6a..104831fa65e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi @@ -35,9 +35,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _boolean_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -45,7 +70,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _boolean_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -97,9 +137,34 @@ class BaseApi(api_client.Api): class Boolean(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def boolean( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -107,7 +172,22 @@ class Boolean(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def boolean( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._boolean_oapg( body=body, @@ -122,9 +202,48 @@ class Boolean(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -132,7 +251,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._boolean_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py index 8a5362d3cfd..1c55ab10fcc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _composed_one_of_different_types_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _composed_one_of_different_types_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -130,9 +170,34 @@ class instances class ComposedOneOfDifferentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def composed_one_of_different_types( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -140,7 +205,22 @@ def composed_one_of_different_types( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._composed_one_of_different_types_oapg( body=body, @@ -155,9 +235,48 @@ def composed_one_of_different_types( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -165,7 +284,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._composed_one_of_different_types_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi index fd0f12aec0c..4d9a1732972 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _composed_one_of_different_types_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _composed_one_of_different_types_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -99,9 +139,34 @@ class BaseApi(api_client.Api): class ComposedOneOfDifferentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def composed_one_of_different_types( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,7 +174,22 @@ class ComposedOneOfDifferentTypes(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def composed_one_of_different_types( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._composed_one_of_different_types_oapg( body=body, @@ -124,9 +204,48 @@ class ComposedOneOfDifferentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +253,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._composed_one_of_different_types_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py index e7ea25ea04c..7ed8a4d8576 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _string_enum_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _string_enum_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -130,9 +170,34 @@ class instances class StringEnum(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def string_enum( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -140,7 +205,22 @@ def string_enum( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_enum_oapg( body=body, @@ -155,9 +235,48 @@ def string_enum( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -165,7 +284,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_enum_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi index 29291eef290..f3f1f67ed7d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _string_enum_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _string_enum_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -99,9 +139,34 @@ class BaseApi(api_client.Api): class StringEnum(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def string_enum( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,7 +174,22 @@ class StringEnum(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def string_enum( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_enum_oapg( body=body, @@ -124,9 +204,48 @@ class StringEnum(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +253,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_enum_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py index 4154902886e..26d2492f1a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py @@ -69,9 +69,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _mammal_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -79,7 +104,22 @@ def _mammal_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -133,9 +173,34 @@ class instances class Mammal(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def mammal( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,7 +208,22 @@ def mammal( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._mammal_oapg( body=body, @@ -158,9 +238,48 @@ def mammal( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -168,7 +287,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._mammal_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi index 41062d497f6..f74f3c1da77 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _mammal_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -101,9 +141,34 @@ class BaseApi(api_client.Api): class Mammal(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def mammal( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -111,7 +176,22 @@ class Mammal(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._mammal_oapg( body=body, @@ -126,9 +206,48 @@ class Mammal(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -136,7 +255,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._mammal_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py index 4ff581fd00e..59e786575b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _number_with_validations_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _number_with_validations_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -130,9 +170,34 @@ class instances class NumberWithValidations(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def number_with_validations( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -140,7 +205,22 @@ def number_with_validations( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._number_with_validations_oapg( body=body, @@ -155,9 +235,48 @@ def number_with_validations( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -165,7 +284,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._number_with_validations_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi index 57041801964..a6d5d251893 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _number_with_validations_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _number_with_validations_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -99,9 +139,34 @@ class BaseApi(api_client.Api): class NumberWithValidations(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def number_with_validations( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,7 +174,22 @@ class NumberWithValidations(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def number_with_validations( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._number_with_validations_oapg( body=body, @@ -124,9 +204,48 @@ class NumberWithValidations(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +253,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._number_with_validations_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py index bff2bd9a949..bc480989017 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py @@ -68,9 +68,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _object_model_with_ref_props_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -78,7 +103,22 @@ def _object_model_with_ref_props_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -130,9 +170,34 @@ class instances class ObjectModelWithRefProps(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def object_model_with_ref_props( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -140,7 +205,22 @@ def object_model_with_ref_props( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_model_with_ref_props_oapg( body=body, @@ -155,9 +235,48 @@ def object_model_with_ref_props( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -165,7 +284,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_model_with_ref_props_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi index e48de2e5165..fe5e05f4e26 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi @@ -37,9 +37,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _object_model_with_ref_props_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -47,7 +72,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _object_model_with_ref_props_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -99,9 +139,34 @@ class BaseApi(api_client.Api): class ObjectModelWithRefProps(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def object_model_with_ref_props( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,7 +174,22 @@ class ObjectModelWithRefProps(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def object_model_with_ref_props( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_model_with_ref_props_oapg( body=body, @@ -124,9 +204,48 @@ class ObjectModelWithRefProps(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +253,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._object_model_with_ref_props_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py index 6e990df9cda..a59cc38880e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py @@ -66,9 +66,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _string_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -76,7 +101,22 @@ def _string_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -128,9 +168,34 @@ class instances class String(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def string( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -138,7 +203,22 @@ def string( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_oapg( body=body, @@ -153,9 +233,48 @@ def string( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -163,7 +282,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi index 422e8d0829e..95a033780c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi @@ -35,9 +35,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _string_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -45,7 +70,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _string_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -97,9 +137,34 @@ class BaseApi(api_client.Api): class String(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def string( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -107,7 +172,22 @@ class String(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def string( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_oapg( body=body, @@ -122,9 +202,48 @@ class String(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, schemas.Unset] = schemas.unset, content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -132,7 +251,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._string_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py index cfa2be9bece..145b627fb63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py @@ -57,15 +57,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _response_without_schema_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _response_without_schema_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ receives a response without schema @@ -107,15 +141,49 @@ class instances class ResponseWithoutSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def response_without_schema( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._response_without_schema_oapg( accept_content_types=accept_content_types, @@ -128,15 +196,49 @@ def response_without_schema( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._response_without_schema_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi index 827291c6f8a..722716c7a52 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi @@ -33,15 +33,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _response_without_schema_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _response_without_schema_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ receives a response without schema @@ -83,15 +117,49 @@ class BaseApi(api_client.Api): class ResponseWithoutSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def response_without_schema( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._response_without_schema_oapg( accept_content_types=accept_content_types, @@ -104,15 +172,49 @@ class ResponseWithoutSchema(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._response_without_schema_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py index af5cb28dd15..20018f389e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py @@ -226,15 +226,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _query_parameter_collection_format_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -288,15 +322,49 @@ class instances class QueryParameterCollectionFormat(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def query_parameter_collection_format( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._query_parameter_collection_format_oapg( query_params=query_params, @@ -309,15 +377,49 @@ def query_parameter_collection_format( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._query_parameter_collection_format_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi index 9b7dee9311d..64069d6783e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi @@ -147,15 +147,49 @@ RefParamSchema = StringWithValidation class BaseApi(api_client.Api): + @typing.overload def _query_parameter_collection_format_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -209,15 +243,49 @@ class BaseApi(api_client.Api): class QueryParameterCollectionFormat(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def query_parameter_collection_format( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._query_parameter_collection_format_oapg( query_params=query_params, @@ -230,15 +298,49 @@ class QueryParameterCollectionFormat(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._query_parameter_collection_format_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py index c705235d88b..da6725cc58c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py @@ -67,9 +67,34 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _upload_download_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -77,7 +102,22 @@ def _upload_download_file_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads a file and downloads a file using application/octet-stream @@ -132,9 +172,34 @@ class instances class UploadDownloadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_download_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -142,7 +207,22 @@ def upload_download_file( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_download_file_oapg( body=body, @@ -157,9 +237,48 @@ def upload_download_file( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -167,7 +286,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_download_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi index f7825657cdc..15892d17790 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi @@ -35,9 +35,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _upload_download_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -45,7 +70,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads a file and downloads a file using application/octet-stream @@ -100,9 +140,34 @@ class BaseApi(api_client.Api): class UploadDownloadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_download_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -110,7 +175,22 @@ class UploadDownloadFile(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_download_file_oapg( body=body, @@ -125,9 +205,48 @@ class UploadDownloadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = 'application/octet-stream', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -135,7 +254,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_download_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py index 90d7d406ebf..3cd5ff6f1bb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py @@ -132,9 +132,48 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -142,7 +181,8 @@ def _upload_file_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads a file using multipart/form-data @@ -195,9 +235,34 @@ class instances class UploadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -205,7 +270,22 @@ def upload_file( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_oapg( body=body, @@ -220,9 +300,48 @@ def upload_file( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -230,7 +349,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi index 515aa163476..5de8c624466 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi @@ -101,9 +101,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -111,7 +150,8 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads a file using multipart/form-data @@ -164,9 +204,34 @@ class BaseApi(api_client.Api): class UploadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -174,7 +239,22 @@ class UploadFile(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_file( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_oapg( body=body, @@ -189,9 +269,48 @@ class UploadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -199,7 +318,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_file_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py index 561b9840e86..5176b44a3b7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py @@ -139,9 +139,48 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_files_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -149,7 +188,8 @@ def _upload_files_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads files using multipart/form-data @@ -202,9 +242,34 @@ class instances class UploadFiles(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_files( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -212,7 +277,22 @@ def upload_files( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_files_oapg( body=body, @@ -227,9 +307,48 @@ def upload_files( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,7 +356,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_files_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi index 800be99613d..ef90c82e6dc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi @@ -108,9 +108,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_files_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_files_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -118,7 +157,8 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads files using multipart/form-data @@ -171,9 +211,34 @@ class BaseApi(api_client.Api): class UploadFiles(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_files( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -181,7 +246,22 @@ class UploadFiles(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_files( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_files_oapg( body=body, @@ -196,9 +276,48 @@ class UploadFiles(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -206,7 +325,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_files_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py index a396adbc027..d9ce90c2f7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py @@ -110,15 +110,49 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _foo_get_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _foo_get_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -163,15 +197,49 @@ class instances class FooGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def foo_get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._foo_get_oapg( accept_content_types=accept_content_types, @@ -184,15 +252,49 @@ def foo_get( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._foo_get_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi index 4f7e0cd0856..7a42dcaffb0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi @@ -87,15 +87,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _foo_get_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _foo_get_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ :param skip_deserialization: If true then api_response.response will be set but @@ -140,15 +174,49 @@ class BaseApi(api_client.Api): class FooGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def foo_get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._foo_get_oapg( accept_content_types=accept_content_types, @@ -161,15 +229,49 @@ class FooGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._foo_get_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py index d944d243b5b..ad73e4d5185 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py @@ -89,9 +89,34 @@ class ApiResponseFor405(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _add_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -99,7 +124,22 @@ def _add_pet_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Add a new pet to the store @@ -155,9 +195,34 @@ class instances class AddPet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def add_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -165,7 +230,22 @@ def add_pet( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._add_pet_oapg( body=body, @@ -180,9 +260,48 @@ def add_pet( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -190,7 +309,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._add_pet_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi index efd25a14172..70f01f93d5f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi @@ -34,9 +34,34 @@ SchemaForRequestBodyApplicationXml = Pet class BaseApi(api_client.Api): + @typing.overload def _add_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -44,7 +69,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Add a new pet to the store @@ -100,9 +140,34 @@ class BaseApi(api_client.Api): class AddPet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def add_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -110,7 +175,22 @@ class AddPet(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._add_pet_oapg( body=body, @@ -125,9 +205,48 @@ class AddPet(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, @@ -135,7 +254,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._add_pet_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py index 8658e89bdc1..4fdbfe19e9a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py @@ -102,16 +102,55 @@ class ApiResponseFor405(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _update_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Update an existing pet @@ -167,16 +206,55 @@ class instances class UpdatePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def update_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_oapg( body=body, @@ -191,16 +269,55 @@ def update_pet( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi index eea41d2ad06..815734261ab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi @@ -34,16 +34,55 @@ SchemaForRequestBodyApplicationXml = Pet class BaseApi(api_client.Api): + @typing.overload def _update_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Update an existing pet @@ -99,16 +138,55 @@ class BaseApi(api_client.Api): class UpdatePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def update_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_oapg( body=body, @@ -123,16 +201,55 @@ class UpdatePet(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py index b8b945f54fa..dc71fe90bec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py @@ -203,8 +203,31 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _find_pets_by_status_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _find_pets_by_status_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -212,7 +235,21 @@ def _find_pets_by_status_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Finds Pets by status @@ -269,8 +306,31 @@ class instances class FindPetsByStatus(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def find_pets_by_status( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -278,7 +338,21 @@ def find_pets_by_status( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_status_oapg( query_params=query_params, @@ -292,8 +366,44 @@ def find_pets_by_status( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -301,7 +411,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_status_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi index c626e911a77..8d5d68cd194 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi @@ -128,8 +128,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _find_pets_by_status_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _find_pets_by_status_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -137,7 +160,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Finds Pets by status @@ -194,8 +231,31 @@ class BaseApi(api_client.Api): class FindPetsByStatus(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def find_pets_by_status( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -203,7 +263,21 @@ class FindPetsByStatus(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_status_oapg( query_params=query_params, @@ -217,8 +291,44 @@ class FindPetsByStatus(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -226,7 +336,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_status_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py index 03b395a6da4..73659ef5b19 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py @@ -178,8 +178,31 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _find_pets_by_tags_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -187,7 +210,21 @@ def _find_pets_by_tags_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Finds Pets by tags @@ -244,8 +281,31 @@ class instances class FindPetsByTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def find_pets_by_tags( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -253,7 +313,21 @@ def find_pets_by_tags( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_tags_oapg( query_params=query_params, @@ -267,8 +341,44 @@ def find_pets_by_tags( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -276,7 +386,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_tags_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi index a4e2c33e5e7..1f580f16acd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi @@ -111,8 +111,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _find_pets_by_tags_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,7 +143,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Finds Pets by tags @@ -177,8 +214,31 @@ class BaseApi(api_client.Api): class FindPetsByTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def find_pets_by_tags( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -186,7 +246,21 @@ class FindPetsByTags(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_tags_oapg( query_params=query_params, @@ -200,8 +274,44 @@ class FindPetsByTags(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -209,7 +319,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._find_pets_by_tags_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py index 83c429bdea4..263fbbc71a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py @@ -100,15 +100,51 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _delete_pet_oapg( - self: api_client.Api, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_pet_oapg( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Deletes a pet @@ -171,15 +207,51 @@ class instances class DeletePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def delete_pet( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def delete_pet( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_pet_oapg( header_params=header_params, @@ -193,15 +265,51 @@ def delete_pet( class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_pet_oapg( header_params=header_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi index 821fe2bd79f..5d3588e94c0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi @@ -33,15 +33,51 @@ PetIdSchema = schemas.Int64Schema class BaseApi(api_client.Api): + @typing.overload def _delete_pet_oapg( - self: api_client.Api, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_pet_oapg( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Deletes a pet @@ -104,15 +140,51 @@ class BaseApi(api_client.Api): class DeletePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def delete_pet( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def delete_pet( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_pet_oapg( header_params=header_params, @@ -126,15 +198,51 @@ class DeletePet(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_pet_oapg( header_params=header_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py index 2309680029b..26ae505591f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py @@ -118,8 +118,31 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _get_pet_by_id_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_pet_by_id_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -127,7 +150,21 @@ def _get_pet_by_id_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Find pet by ID @@ -184,8 +221,31 @@ class instances class GetPetById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_pet_by_id( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -193,7 +253,21 @@ def get_pet_by_id( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_pet_by_id_oapg( path_params=path_params, @@ -207,8 +281,44 @@ def get_pet_by_id( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -216,7 +326,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_pet_by_id_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi index 184adb607d2..5a6d78db835 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi @@ -39,8 +39,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _get_pet_by_id_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_pet_by_id_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -48,7 +71,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Find pet by ID @@ -105,8 +142,31 @@ class BaseApi(api_client.Api): class GetPetById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_pet_by_id( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -114,7 +174,21 @@ class GetPetById(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_pet_by_id_oapg( path_params=path_params, @@ -128,8 +202,44 @@ class GetPetById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -137,7 +247,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_pet_by_id_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py index 76250ba9b3e..f0b549c7ea1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py @@ -144,16 +144,55 @@ class ApiResponseFor405(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _update_pet_with_form_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Updates a pet in the store with form data @@ -218,16 +257,55 @@ class instances class UpdatePetWithForm(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def update_pet_with_form( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_with_form_oapg( body=body, @@ -242,16 +320,55 @@ def update_pet_with_form( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_with_form_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi index 4a1eee42e7f..ca2656cb877 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi @@ -92,16 +92,55 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( class BaseApi(api_client.Api): + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _update_pet_with_form_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Updates a pet in the store with form data @@ -166,16 +205,55 @@ class BaseApi(api_client.Api): class UpdatePetWithForm(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_pet_with_form( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def update_pet_with_form( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_with_form_oapg( body=body, @@ -190,16 +268,55 @@ class UpdatePetWithForm(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/x-www-form-urlencoded', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_pet_with_form_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py index 432d5586069..b159da69cb6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py @@ -156,9 +156,51 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_image_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -167,7 +209,8 @@ def _upload_image_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads an image @@ -235,9 +278,36 @@ class instances class UploadImage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_image( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -246,7 +316,23 @@ def upload_image( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_image_oapg( body=body, @@ -262,9 +348,51 @@ def upload_image( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -273,7 +401,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_image_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi index 08b46e10d87..9d109c52326 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi @@ -98,9 +98,51 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _upload_image_oapg( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def _upload_image_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -109,7 +151,8 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ uploads an image @@ -177,9 +220,36 @@ class BaseApi(api_client.Api): class UploadImage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def upload_image( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -188,7 +258,23 @@ class UploadImage(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def upload_image( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_image_oapg( body=body, @@ -204,9 +290,51 @@ class UploadImage(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, + body: typing.Union[SchemaForRequestBodyMultipartFormData,dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'multipart/form-data', accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -215,7 +343,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._upload_image_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py index 794c49c9f26..b2b336258e7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py @@ -87,15 +87,49 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _get_inventory_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_inventory_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Returns pet inventories by status @@ -138,15 +172,49 @@ class instances class GetInventory(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_inventory( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_inventory_oapg( accept_content_types=accept_content_types, @@ -159,15 +227,49 @@ def get_inventory( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_inventory_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi index 6ace8ae4e50..ec3b6fd646a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi @@ -61,15 +61,49 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _get_inventory_oapg( - self: api_client.Api, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_inventory_oapg( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Returns pet inventories by status @@ -112,15 +146,49 @@ class BaseApi(api_client.Api): class GetInventory(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_inventory( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_inventory_oapg( accept_content_types=accept_content_types, @@ -133,15 +201,49 @@ class GetInventory(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_inventory_oapg( accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py index aba51cba12a..fa17981d435 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py @@ -87,9 +87,34 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _place_order_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -97,7 +122,22 @@ def _place_order_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Place an order for a pet @@ -152,9 +192,34 @@ class instances class PlaceOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def place_order( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -162,7 +227,22 @@ def place_order( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._place_order_oapg( body=body, @@ -177,9 +257,48 @@ def place_order( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -187,7 +306,8 @@ def post( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._place_order_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi index 5a0d7684aa1..71ebf0d1bee 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi @@ -39,9 +39,34 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _place_order_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -49,7 +74,22 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Place an order for a pet @@ -104,9 +144,34 @@ class BaseApi(api_client.Api): class PlaceOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def place_order( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -114,7 +179,22 @@ class PlaceOrder(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._place_order_oapg( body=body, @@ -129,9 +209,48 @@ class PlaceOrder(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -139,7 +258,8 @@ class ApiForpost(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._place_order_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py index 05b16de6cb9..49796c56bc7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py @@ -84,14 +84,47 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _delete_order_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_order_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete purchase order by ID @@ -141,14 +174,47 @@ class instances class DeleteOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete_order( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_order_oapg( path_params=path_params, @@ -161,14 +227,47 @@ def delete_order( class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_order_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi index e4350d629ea..f25caf6046f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi @@ -30,14 +30,47 @@ OrderIdSchema = schemas.StrSchema class BaseApi(api_client.Api): + @typing.overload def _delete_order_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_order_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete purchase order by ID @@ -87,14 +120,47 @@ class BaseApi(api_client.Api): class DeleteOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete_order( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_order_oapg( path_params=path_params, @@ -107,14 +173,47 @@ class DeleteOrder(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_order_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py index cae807ed63c..f986cc8be24 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py @@ -125,8 +125,31 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _get_order_by_id_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_order_by_id_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -134,7 +157,21 @@ def _get_order_by_id_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Find purchase order by ID @@ -190,8 +227,31 @@ class instances class GetOrderById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_order_by_id( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -199,7 +259,21 @@ def get_order_by_id( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_order_by_id_oapg( path_params=path_params, @@ -213,8 +287,44 @@ def get_order_by_id( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -222,7 +332,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_order_by_id_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi index cf9aca7145c..579bf99e490 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi @@ -44,8 +44,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _get_order_by_id_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_order_by_id_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -53,7 +76,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Find purchase order by ID @@ -109,8 +146,31 @@ class BaseApi(api_client.Api): class GetOrderById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_order_by_id( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -118,7 +178,21 @@ class GetOrderById(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_order_by_id_oapg( path_params=path_params, @@ -132,8 +206,44 @@ class GetOrderById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -141,7 +251,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_order_by_id_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py index 4dd2c94c164..9de1d527193 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py @@ -59,16 +59,53 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _create_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Create user @@ -124,16 +161,53 @@ class instances class CreateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_user_oapg( body=body, @@ -147,16 +221,53 @@ def create_user( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_user_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi index 171956cf707..55c283c4d83 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi @@ -33,16 +33,53 @@ SchemaForRequestBodyApplicationJson = User class BaseApi(api_client.Api): + @typing.overload def _create_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Create user @@ -98,16 +135,53 @@ class BaseApi(api_client.Api): class CreateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_user_oapg( body=body, @@ -121,16 +195,53 @@ class CreateUser(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_user_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py index 35e44ef1d46..b1fd4107685 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py @@ -84,16 +84,53 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _create_users_with_array_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Creates list of users with given input array @@ -149,16 +186,53 @@ class instances class CreateUsersWithArrayInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_users_with_array_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_array_input_oapg( body=body, @@ -172,16 +246,53 @@ def create_users_with_array_input( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_array_input_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi index 19037fd1b36..344910768e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi @@ -58,16 +58,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _create_users_with_array_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Creates list of users with given input array @@ -123,16 +160,53 @@ class BaseApi(api_client.Api): class CreateUsersWithArrayInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_users_with_array_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_array_input_oapg( body=body, @@ -146,16 +220,53 @@ class CreateUsersWithArrayInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_array_input_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py index 491da3305b0..217f2a9b9c2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py @@ -84,16 +84,53 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _create_users_with_list_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Creates list of users with given input array @@ -149,16 +186,53 @@ class instances class CreateUsersWithListInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_users_with_list_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_list_input_oapg( body=body, @@ -172,16 +246,53 @@ def create_users_with_list_input( class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_list_input_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi index 2f2321d8504..f493292f6d7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi @@ -58,16 +58,53 @@ class SchemaForRequestBodyApplicationJson( class BaseApi(api_client.Api): + @typing.overload def _create_users_with_list_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Creates list of users with given input array @@ -123,16 +160,53 @@ class BaseApi(api_client.Api): class CreateUsersWithListInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def create_users_with_list_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_list_input_oapg( body=body, @@ -146,16 +220,53 @@ class CreateUsersWithListInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._create_users_with_list_input_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py index 0e913fbb36a..5c45a9e3b6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py @@ -133,8 +133,31 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _login_user_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _login_user_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -142,7 +165,21 @@ def _login_user_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Logs user into the system @@ -199,8 +236,31 @@ class instances class LoginUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def login_user( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -208,7 +268,21 @@ def login_user( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._login_user_oapg( query_params=query_params, @@ -222,8 +296,44 @@ def login_user( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -231,7 +341,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._login_user_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi index fb90bd6d3ae..f2a6115a3d3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi @@ -40,8 +40,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _login_user_oapg( - self: api_client.Api, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _login_user_oapg( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -49,7 +72,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Logs user into the system @@ -106,8 +143,31 @@ class BaseApi(api_client.Api): class LoginUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def login_user( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -115,7 +175,21 @@ class LoginUser(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._login_user_oapg( query_params=query_params, @@ -129,8 +203,44 @@ class LoginUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -138,7 +248,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._login_user_oapg( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py index e9b8bf377ea..f374d4fa68e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py @@ -45,14 +45,45 @@ class ApiResponseForDefault(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _logout_user_oapg( - self: api_client.Api, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _logout_user_oapg( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Logs out current logged in user session @@ -92,14 +123,45 @@ class instances class LogoutUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def logout_user( - self: BaseApi, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._logout_user_oapg( stream=stream, @@ -111,14 +173,45 @@ def logout_user( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._logout_user_oapg( stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi index ba8f80388d7..ffafb540d1c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi @@ -28,14 +28,45 @@ from petstore_api import schemas # noqa: F401 class BaseApi(api_client.Api): + @typing.overload def _logout_user_oapg( - self: api_client.Api, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _logout_user_oapg( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Logs out current logged in user session @@ -75,14 +106,45 @@ class BaseApi(api_client.Api): class LogoutUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def logout_user( - self: BaseApi, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._logout_user_oapg( stream=stream, @@ -94,14 +156,45 @@ class LogoutUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseForDefault,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._logout_user_oapg( stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py index c78b157c12a..60ac4b3ed7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py @@ -84,14 +84,47 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _delete_user_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_user_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete user @@ -141,14 +174,47 @@ class instances class DeleteUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete_user( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_user_oapg( path_params=path_params, @@ -161,14 +227,47 @@ def delete_user( class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_user_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi index 77a7de83384..b16192f0efe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi @@ -30,14 +30,47 @@ UsernameSchema = schemas.StrSchema class BaseApi(api_client.Api): + @typing.overload def _delete_user_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _delete_user_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Delete user @@ -87,14 +120,47 @@ class BaseApi(api_client.Api): class DeleteUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete_user( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_user_oapg( path_params=path_params, @@ -107,14 +173,47 @@ class DeleteUser(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def delete( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._delete_user_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py index ffb005b23ee..b6c7288eb9c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py @@ -115,8 +115,31 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _get_user_by_name_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_user_by_name_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,7 +147,21 @@ def _get_user_by_name_oapg( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Get user by user name @@ -180,8 +217,31 @@ class instances class GetUserByName(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_user_by_name( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -189,7 +249,21 @@ def get_user_by_name( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_user_by_name_oapg( path_params=path_params, @@ -203,8 +277,44 @@ def get_user_by_name( class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -212,7 +322,8 @@ def get( skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_user_by_name_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi index 8096176552b..02572945ffe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi @@ -39,8 +39,31 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload def _get_user_by_name_oapg( - self: api_client.Api, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_user_by_name_oapg( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -48,7 +71,21 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Get user by user name @@ -104,8 +141,31 @@ class BaseApi(api_client.Api): class GetUserByName(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload def get_user_by_name( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -113,7 +173,21 @@ class GetUserByName(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_user_by_name_oapg( path_params=path_params, @@ -127,8 +201,44 @@ class GetUserByName(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[ApiResponseFor200,api_client.ApiResponse]: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def get( - self: BaseApi, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -136,7 +246,8 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ) -> typing.Union[ ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._get_user_by_name_oapg( path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py index b9060cb6e7a..798b0a9433e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py @@ -98,16 +98,55 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): + @typing.overload def _update_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Updated user @@ -173,16 +212,55 @@ class instances class UpdateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def update_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_user_oapg( body=body, @@ -197,16 +275,55 @@ def update_user( class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_user_oapg( body=body, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi index fd208aa8050..e0119065c02 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi @@ -35,16 +35,55 @@ SchemaForRequestBodyApplicationJson = User class BaseApi(api_client.Api): + @typing.overload def _update_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: """ Updated user @@ -110,16 +149,55 @@ class BaseApi(api_client.Api): class UpdateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload def update_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_user_oapg( body=body, @@ -134,16 +212,55 @@ class UpdateUser(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = False, + ) -> typing.Union[api_client.ApiResponse]: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = True, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + path_params: RequestPathParams = frozendict.frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: + ... + def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], path_params: RequestPathParams = frozendict.frozendict(), content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization + api_client.ApiResponse, + api_client.ApiResponseWithoutDeserialization, ]: return self._update_user_oapg( body=body,