From f03cbea9717c172762072a85f7ce0cee7f33ef9e Mon Sep 17 00:00:00 2001 From: Robert Schweizer Date: Tue, 10 Oct 2023 12:32:52 +0200 Subject: [PATCH] feat: Add line breaks in Python API methods (#16770) --- .../src/main/resources/python/api.mustache | 32 +- .../openapi_client/api/auth_api.py | 10 +- .../openapi_client/api/body_api.py | 82 ++++- .../openapi_client/api/form_api.py | 38 ++- .../openapi_client/api/header_api.py | 20 +- .../openapi_client/api/path_api.py | 18 +- .../openapi_client/api/query_api.py | 106 +++++- .../python/openapi_client/api/auth_api.py | 10 +- .../python/openapi_client/api/body_api.py | 82 ++++- .../python/openapi_client/api/form_api.py | 38 ++- .../python/openapi_client/api/header_api.py | 20 +- .../python/openapi_client/api/path_api.py | 18 +- .../python/openapi_client/api/query_api.py | 106 +++++- .../petstore_api/api/another_fake_api.py | 12 +- .../petstore_api/api/default_api.py | 10 +- .../petstore_api/api/fake_api.py | 320 +++++++++++++++--- .../api/fake_classname_tags123_api.py | 12 +- .../petstore_api/api/pet_api.py | 122 ++++++- .../petstore_api/api/store_api.py | 46 ++- .../petstore_api/api/user_api.py | 98 +++++- .../petstore_api/api/another_fake_api.py | 12 +- .../python/petstore_api/api/default_api.py | 10 +- .../python/petstore_api/api/fake_api.py | 320 +++++++++++++++--- .../api/fake_classname_tags123_api.py | 12 +- .../python/petstore_api/api/pet_api.py | 122 ++++++- .../python/petstore_api/api/store_api.py | 46 ++- .../python/petstore_api/api/user_api.py | 98 +++++- 27 files changed, 1552 insertions(+), 268 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 705574ab9a3..c85f39d4081 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -37,10 +37,22 @@ class {{classname}}: @validate_call {{#asyncio}} - async def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: # noqa: E501 + async def {{operationId}}( + self, + {{#allParams}} + {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, + {{/allParams}} + **kwargs, + ) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: {{/asyncio}} {{^asyncio}} - def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: # noqa: E501 + def {{operationId}}( + self, + {{#allParams}} + {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, + {{/allParams}} + **kwargs, + ) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: {{/asyncio}} """{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 @@ -80,10 +92,22 @@ class {{classname}}: @validate_call {{#asyncio}} - async def {{operationId}}_with_http_info(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> ApiResponse: # noqa: E501 + async def {{operationId}}_with_http_info( + self, + {{#allParams}} + {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, + {{/allParams}} + **kwargs, + ) -> ApiResponse: {{/asyncio}} {{^asyncio}} - def {{operationId}}_with_http_info(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> ApiResponse: # noqa: E501 + def {{operationId}}_with_http_info( + self, + {{#allParams}} + {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, + {{/allParams}} + **kwargs, + ) -> ApiResponse: {{/asyncio}} """{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py index 52ec94980e9..8c850e89063 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py @@ -42,7 +42,10 @@ class AuthApi: self.api_client = api_client @validate_call - def test_auth_http_basic(self, **kwargs) -> str: # noqa: E501 + def test_auth_http_basic( + self, + **kwargs, + ) -> str: """To test HTTP basic authentication # noqa: E501 To test HTTP basic authentication # noqa: E501 @@ -70,7 +73,10 @@ class AuthApi: return self.test_auth_http_basic_with_http_info(**kwargs) # noqa: E501 @validate_call - def test_auth_http_basic_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def test_auth_http_basic_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """To test HTTP basic authentication # noqa: E501 To test HTTP basic authentication # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py index ee35d4c2674..c6b4db86051 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py @@ -50,7 +50,10 @@ class BodyApi: self.api_client = api_client @validate_call - def test_binary_gif(self, **kwargs) -> bytearray: # noqa: E501 + def test_binary_gif( + self, + **kwargs, + ) -> bytearray: """Test binary (gif) response body # noqa: E501 Test binary (gif) response body # noqa: E501 @@ -78,7 +81,10 @@ class BodyApi: return self.test_binary_gif_with_http_info(**kwargs) # noqa: E501 @validate_call - def test_binary_gif_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def test_binary_gif_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Test binary (gif) response body # noqa: E501 Test binary (gif) response body # noqa: E501 @@ -182,7 +188,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_application_octetstream_binary(self, body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> str: # noqa: E501 + def test_body_application_octetstream_binary( + self, + body: Optional[Union[StrictBytes, StrictStr]] = None, + **kwargs, + ) -> str: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -212,7 +222,11 @@ class BodyApi: return self.test_body_application_octetstream_binary_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def test_body_application_octetstream_binary_with_http_info(self, body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_body_application_octetstream_binary_with_http_info( + self, + body: Optional[Union[StrictBytes, StrictStr]] = None, + **kwargs, + ) -> ApiResponse: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -334,7 +348,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_multipart_formdata_array_of_binary(self, files : List[Union[StrictBytes, StrictStr]], **kwargs) -> str: # noqa: E501 + def test_body_multipart_formdata_array_of_binary( + self, + files: List[Union[StrictBytes, StrictStr]], + **kwargs, + ) -> str: """Test array of binary in multipart mime # noqa: E501 Test array of binary in multipart mime # noqa: E501 @@ -364,7 +382,11 @@ class BodyApi: return self.test_body_multipart_formdata_array_of_binary_with_http_info(files, **kwargs) # noqa: E501 @validate_call - def test_body_multipart_formdata_array_of_binary_with_http_info(self, files : List[Union[StrictBytes, StrictStr]], **kwargs) -> ApiResponse: # noqa: E501 + def test_body_multipart_formdata_array_of_binary_with_http_info( + self, + files: List[Union[StrictBytes, StrictStr]], + **kwargs, + ) -> ApiResponse: """Test array of binary in multipart mime # noqa: E501 Test array of binary in multipart mime # noqa: E501 @@ -482,7 +504,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_free_form_object_response_string(self, body : Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_free_form_object_response_string( + self, + body: Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, + **kwargs, + ) -> str: """Test free form object # noqa: E501 Test free form object # noqa: E501 @@ -512,7 +538,11 @@ class BodyApi: return self.test_echo_body_free_form_object_response_string_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def test_echo_body_free_form_object_response_string_with_http_info(self, body : Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_free_form_object_response_string_with_http_info( + self, + body: Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, + **kwargs, + ) -> ApiResponse: """Test free form object # noqa: E501 Test free form object # noqa: E501 @@ -629,7 +659,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_pet(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> Pet: # noqa: E501 + def test_echo_body_pet( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> Pet: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -659,7 +693,11 @@ class BodyApi: return self.test_echo_body_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def test_echo_body_pet_with_http_info(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_pet_with_http_info( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> ApiResponse: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -776,7 +814,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_pet_response_string(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_pet_response_string( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> str: """Test empty response body # noqa: E501 Test empty response body # noqa: E501 @@ -806,7 +848,11 @@ class BodyApi: return self.test_echo_body_pet_response_string_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def test_echo_body_pet_response_string_with_http_info(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_pet_response_string_with_http_info( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> ApiResponse: """Test empty response body # noqa: E501 Test empty response body # noqa: E501 @@ -923,7 +969,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_tag_response_string(self, tag : Annotated[Optional[Tag], Field(description="Tag object")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_tag_response_string( + self, + tag: Annotated[Optional[Tag], Field(description="Tag object")] = None, + **kwargs, + ) -> str: """Test empty json (request body) # noqa: E501 Test empty json (request body) # noqa: E501 @@ -953,7 +1003,11 @@ class BodyApi: return self.test_echo_body_tag_response_string_with_http_info(tag, **kwargs) # noqa: E501 @validate_call - def test_echo_body_tag_response_string_with_http_info(self, tag : Annotated[Optional[Tag], Field(description="Tag object")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_tag_response_string_with_http_info( + self, + tag: Annotated[Optional[Tag], Field(description="Tag object")] = None, + **kwargs, + ) -> ApiResponse: """Test empty json (request body) # noqa: E501 Test empty json (request body) # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py index 9c24a5feebd..9e1739fad54 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py @@ -46,7 +46,13 @@ class FormApi: self.api_client = api_client @validate_call - def test_form_integer_boolean_string(self, integer_form : Optional[StrictInt] = None, boolean_form : Optional[StrictBool] = None, string_form : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_form_integer_boolean_string( + self, + integer_form: Optional[StrictInt] = None, + boolean_form: Optional[StrictBool] = None, + string_form: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test form parameter(s) # noqa: E501 Test form parameter(s) # noqa: E501 @@ -80,7 +86,13 @@ class FormApi: return self.test_form_integer_boolean_string_with_http_info(integer_form, boolean_form, string_form, **kwargs) # noqa: E501 @validate_call - def test_form_integer_boolean_string_with_http_info(self, integer_form : Optional[StrictInt] = None, boolean_form : Optional[StrictBool] = None, string_form : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_form_integer_boolean_string_with_http_info( + self, + integer_form: Optional[StrictInt] = None, + boolean_form: Optional[StrictBool] = None, + string_form: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test form parameter(s) # noqa: E501 Test form parameter(s) # noqa: E501 @@ -209,7 +221,16 @@ class FormApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_form_oneof(self, form1 : Optional[StrictStr] = None, form2 : Optional[StrictInt] = None, form3 : Optional[StrictStr] = None, form4 : Optional[StrictBool] = None, id : Optional[StrictInt] = None, name : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_form_oneof( + self, + form1: Optional[StrictStr] = None, + form2: Optional[StrictInt] = None, + form3: Optional[StrictStr] = None, + form4: Optional[StrictBool] = None, + id: Optional[StrictInt] = None, + name: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test form parameter(s) for oneOf schema # noqa: E501 Test form parameter(s) for oneOf schema # noqa: E501 @@ -249,7 +270,16 @@ class FormApi: return self.test_form_oneof_with_http_info(form1, form2, form3, form4, id, name, **kwargs) # noqa: E501 @validate_call - def test_form_oneof_with_http_info(self, form1 : Optional[StrictStr] = None, form2 : Optional[StrictInt] = None, form3 : Optional[StrictStr] = None, form4 : Optional[StrictBool] = None, id : Optional[StrictInt] = None, name : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_form_oneof_with_http_info( + self, + form1: Optional[StrictStr] = None, + form2: Optional[StrictInt] = None, + form3: Optional[StrictStr] = None, + form4: Optional[StrictBool] = None, + id: Optional[StrictInt] = None, + name: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test form parameter(s) for oneOf schema # noqa: E501 Test form parameter(s) for oneOf schema # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py index 1bdcd42cbd3..624db27756d 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py @@ -47,7 +47,15 @@ class HeaderApi: self.api_client = api_client @validate_call - def test_header_integer_boolean_string_enums(self, integer_header : Optional[StrictInt] = None, boolean_header : Optional[StrictBool] = None, string_header : Optional[StrictStr] = None, enum_nonref_string_header : Optional[StrictStr] = None, enum_ref_string_header : Optional[StringEnumRef] = None, **kwargs) -> str: # noqa: E501 + def test_header_integer_boolean_string_enums( + self, + integer_header: Optional[StrictInt] = None, + boolean_header: Optional[StrictBool] = None, + string_header: Optional[StrictStr] = None, + enum_nonref_string_header: Optional[StrictStr] = None, + enum_ref_string_header: Optional[StringEnumRef] = None, + **kwargs, + ) -> str: """Test header parameter(s) # noqa: E501 Test header parameter(s) # noqa: E501 @@ -85,7 +93,15 @@ class HeaderApi: return self.test_header_integer_boolean_string_enums_with_http_info(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, **kwargs) # noqa: E501 @validate_call - def test_header_integer_boolean_string_enums_with_http_info(self, integer_header : Optional[StrictInt] = None, boolean_header : Optional[StrictBool] = None, string_header : Optional[StrictStr] = None, enum_nonref_string_header : Optional[StrictStr] = None, enum_ref_string_header : Optional[StringEnumRef] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_header_integer_boolean_string_enums_with_http_info( + self, + integer_header: Optional[StrictInt] = None, + boolean_header: Optional[StrictBool] = None, + string_header: Optional[StrictStr] = None, + enum_nonref_string_header: Optional[StrictStr] = None, + enum_ref_string_header: Optional[StringEnumRef] = None, + **kwargs, + ) -> ApiResponse: """Test header parameter(s) # noqa: E501 Test header parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py index ab4f5ecb4d4..6417c355f41 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py @@ -45,7 +45,14 @@ class PathApi: self.api_client = api_client @validate_call - def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path(self, path_string : StrictStr, path_integer : StrictInt, enum_nonref_string_path : StrictStr, enum_ref_string_path : StringEnumRef, **kwargs) -> str: # noqa: E501 + def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path( + self, + path_string: StrictStr, + path_integer: StrictInt, + enum_nonref_string_path: StrictStr, + enum_ref_string_path: StringEnumRef, + **kwargs, + ) -> str: """Test path parameter(s) # noqa: E501 Test path parameter(s) # noqa: E501 @@ -81,7 +88,14 @@ class PathApi: return self.tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, **kwargs) # noqa: E501 @validate_call - def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(self, path_string : StrictStr, path_integer : StrictInt, enum_nonref_string_path : StrictStr, enum_ref_string_path : StringEnumRef, **kwargs) -> ApiResponse: # noqa: E501 + def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info( + self, + path_string: StrictStr, + path_integer: StrictInt, + enum_nonref_string_path: StrictStr, + enum_ref_string_path: StringEnumRef, + **kwargs, + ) -> ApiResponse: """Test path parameter(s) # noqa: E501 Test path parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py index 123998aa92b..f7bdff291c8 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py @@ -51,7 +51,12 @@ class QueryApi: self.api_client = api_client @validate_call - def test_enum_ref_string(self, enum_nonref_string_query : Optional[StrictStr] = None, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs) -> str: # noqa: E501 + def test_enum_ref_string( + self, + enum_nonref_string_query: Optional[StrictStr] = None, + enum_ref_string_query: Optional[StringEnumRef] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -83,7 +88,12 @@ class QueryApi: return self.test_enum_ref_string_with_http_info(enum_nonref_string_query, enum_ref_string_query, **kwargs) # noqa: E501 @validate_call - def test_enum_ref_string_with_http_info(self, enum_nonref_string_query : Optional[StrictStr] = None, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_enum_ref_string_with_http_info( + self, + enum_nonref_string_query: Optional[StrictStr] = None, + enum_ref_string_query: Optional[StringEnumRef] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -199,7 +209,13 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_datetime_date_string(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_query_datetime_date_string( + self, + datetime_query: Optional[datetime] = None, + date_query: Optional[date] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -233,7 +249,13 @@ class QueryApi: return self.test_query_datetime_date_string_with_http_info(datetime_query, date_query, string_query, **kwargs) # noqa: E501 @validate_call - def test_query_datetime_date_string_with_http_info(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_datetime_date_string_with_http_info( + self, + datetime_query: Optional[datetime] = None, + date_query: Optional[date] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -361,7 +383,13 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_integer_boolean_string(self, integer_query : Optional[StrictInt] = None, boolean_query : Optional[StrictBool] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_query_integer_boolean_string( + self, + integer_query: Optional[StrictInt] = None, + boolean_query: Optional[StrictBool] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -395,7 +423,13 @@ class QueryApi: return self.test_query_integer_boolean_string_with_http_info(integer_query, boolean_query, string_query, **kwargs) # noqa: E501 @validate_call - def test_query_integer_boolean_string_with_http_info(self, integer_query : Optional[StrictInt] = None, boolean_query : Optional[StrictBool] = None, string_query : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_integer_boolean_string_with_http_info( + self, + integer_query: Optional[StrictInt] = None, + boolean_query: Optional[StrictBool] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -517,7 +551,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_deep_object_explode_true_object(self, query_object : Optional[Pet] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_deep_object_explode_true_object( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -547,7 +585,11 @@ class QueryApi: return self.test_query_style_deep_object_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_deep_object_explode_true_object_with_http_info(self, query_object : Optional[Pet] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_deep_object_explode_true_object_with_http_info( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -657,7 +699,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_deep_object_explode_true_object_all_of(self, query_object : Optional[Any] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_deep_object_explode_true_object_all_of( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -687,7 +733,11 @@ class QueryApi: return self.test_query_style_deep_object_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_deep_object_explode_true_object_all_of_with_http_info(self, query_object : Optional[Any] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_deep_object_explode_true_object_all_of_with_http_info( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -797,7 +847,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_array_string(self, query_object : Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_array_string( + self, + query_object: Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -827,7 +881,11 @@ class QueryApi: return self.test_query_style_form_explode_true_array_string_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_array_string_with_http_info(self, query_object : Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_array_string_with_http_info( + self, + query_object: Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -937,7 +995,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_object(self, query_object : Optional[Pet] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_object( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -967,7 +1029,11 @@ class QueryApi: return self.test_query_style_form_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_object_with_http_info(self, query_object : Optional[Pet] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_object_with_http_info( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -1077,7 +1143,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_object_all_of(self, query_object : Optional[Any] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_object_all_of( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -1107,7 +1177,11 @@ class QueryApi: return self.test_query_style_form_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_object_all_of_with_http_info(self, query_object : Optional[Any] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_object_all_of_with_http_info( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/auth_api.py b/samples/client/echo_api/python/openapi_client/api/auth_api.py index 52ec94980e9..8c850e89063 100644 --- a/samples/client/echo_api/python/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python/openapi_client/api/auth_api.py @@ -42,7 +42,10 @@ class AuthApi: self.api_client = api_client @validate_call - def test_auth_http_basic(self, **kwargs) -> str: # noqa: E501 + def test_auth_http_basic( + self, + **kwargs, + ) -> str: """To test HTTP basic authentication # noqa: E501 To test HTTP basic authentication # noqa: E501 @@ -70,7 +73,10 @@ class AuthApi: return self.test_auth_http_basic_with_http_info(**kwargs) # noqa: E501 @validate_call - def test_auth_http_basic_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def test_auth_http_basic_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """To test HTTP basic authentication # noqa: E501 To test HTTP basic authentication # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py index ee35d4c2674..c6b4db86051 100644 --- a/samples/client/echo_api/python/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python/openapi_client/api/body_api.py @@ -50,7 +50,10 @@ class BodyApi: self.api_client = api_client @validate_call - def test_binary_gif(self, **kwargs) -> bytearray: # noqa: E501 + def test_binary_gif( + self, + **kwargs, + ) -> bytearray: """Test binary (gif) response body # noqa: E501 Test binary (gif) response body # noqa: E501 @@ -78,7 +81,10 @@ class BodyApi: return self.test_binary_gif_with_http_info(**kwargs) # noqa: E501 @validate_call - def test_binary_gif_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def test_binary_gif_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Test binary (gif) response body # noqa: E501 Test binary (gif) response body # noqa: E501 @@ -182,7 +188,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_application_octetstream_binary(self, body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> str: # noqa: E501 + def test_body_application_octetstream_binary( + self, + body: Optional[Union[StrictBytes, StrictStr]] = None, + **kwargs, + ) -> str: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -212,7 +222,11 @@ class BodyApi: return self.test_body_application_octetstream_binary_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def test_body_application_octetstream_binary_with_http_info(self, body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_body_application_octetstream_binary_with_http_info( + self, + body: Optional[Union[StrictBytes, StrictStr]] = None, + **kwargs, + ) -> ApiResponse: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -334,7 +348,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_multipart_formdata_array_of_binary(self, files : List[Union[StrictBytes, StrictStr]], **kwargs) -> str: # noqa: E501 + def test_body_multipart_formdata_array_of_binary( + self, + files: List[Union[StrictBytes, StrictStr]], + **kwargs, + ) -> str: """Test array of binary in multipart mime # noqa: E501 Test array of binary in multipart mime # noqa: E501 @@ -364,7 +382,11 @@ class BodyApi: return self.test_body_multipart_formdata_array_of_binary_with_http_info(files, **kwargs) # noqa: E501 @validate_call - def test_body_multipart_formdata_array_of_binary_with_http_info(self, files : List[Union[StrictBytes, StrictStr]], **kwargs) -> ApiResponse: # noqa: E501 + def test_body_multipart_formdata_array_of_binary_with_http_info( + self, + files: List[Union[StrictBytes, StrictStr]], + **kwargs, + ) -> ApiResponse: """Test array of binary in multipart mime # noqa: E501 Test array of binary in multipart mime # noqa: E501 @@ -482,7 +504,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_free_form_object_response_string(self, body : Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_free_form_object_response_string( + self, + body: Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, + **kwargs, + ) -> str: """Test free form object # noqa: E501 Test free form object # noqa: E501 @@ -512,7 +538,11 @@ class BodyApi: return self.test_echo_body_free_form_object_response_string_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def test_echo_body_free_form_object_response_string_with_http_info(self, body : Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_free_form_object_response_string_with_http_info( + self, + body: Annotated[Optional[Dict[str, Any]], Field(description="Free form object")] = None, + **kwargs, + ) -> ApiResponse: """Test free form object # noqa: E501 Test free form object # noqa: E501 @@ -629,7 +659,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_pet(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> Pet: # noqa: E501 + def test_echo_body_pet( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> Pet: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -659,7 +693,11 @@ class BodyApi: return self.test_echo_body_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def test_echo_body_pet_with_http_info(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_pet_with_http_info( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> ApiResponse: """Test body parameter(s) # noqa: E501 Test body parameter(s) # noqa: E501 @@ -776,7 +814,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_pet_response_string(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_pet_response_string( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> str: """Test empty response body # noqa: E501 Test empty response body # noqa: E501 @@ -806,7 +848,11 @@ class BodyApi: return self.test_echo_body_pet_response_string_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def test_echo_body_pet_response_string_with_http_info(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_pet_response_string_with_http_info( + self, + pet: Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, + **kwargs, + ) -> ApiResponse: """Test empty response body # noqa: E501 Test empty response body # noqa: E501 @@ -923,7 +969,11 @@ class BodyApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_echo_body_tag_response_string(self, tag : Annotated[Optional[Tag], Field(description="Tag object")] = None, **kwargs) -> str: # noqa: E501 + def test_echo_body_tag_response_string( + self, + tag: Annotated[Optional[Tag], Field(description="Tag object")] = None, + **kwargs, + ) -> str: """Test empty json (request body) # noqa: E501 Test empty json (request body) # noqa: E501 @@ -953,7 +1003,11 @@ class BodyApi: return self.test_echo_body_tag_response_string_with_http_info(tag, **kwargs) # noqa: E501 @validate_call - def test_echo_body_tag_response_string_with_http_info(self, tag : Annotated[Optional[Tag], Field(description="Tag object")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_echo_body_tag_response_string_with_http_info( + self, + tag: Annotated[Optional[Tag], Field(description="Tag object")] = None, + **kwargs, + ) -> ApiResponse: """Test empty json (request body) # noqa: E501 Test empty json (request body) # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/form_api.py b/samples/client/echo_api/python/openapi_client/api/form_api.py index 9c24a5feebd..9e1739fad54 100644 --- a/samples/client/echo_api/python/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python/openapi_client/api/form_api.py @@ -46,7 +46,13 @@ class FormApi: self.api_client = api_client @validate_call - def test_form_integer_boolean_string(self, integer_form : Optional[StrictInt] = None, boolean_form : Optional[StrictBool] = None, string_form : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_form_integer_boolean_string( + self, + integer_form: Optional[StrictInt] = None, + boolean_form: Optional[StrictBool] = None, + string_form: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test form parameter(s) # noqa: E501 Test form parameter(s) # noqa: E501 @@ -80,7 +86,13 @@ class FormApi: return self.test_form_integer_boolean_string_with_http_info(integer_form, boolean_form, string_form, **kwargs) # noqa: E501 @validate_call - def test_form_integer_boolean_string_with_http_info(self, integer_form : Optional[StrictInt] = None, boolean_form : Optional[StrictBool] = None, string_form : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_form_integer_boolean_string_with_http_info( + self, + integer_form: Optional[StrictInt] = None, + boolean_form: Optional[StrictBool] = None, + string_form: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test form parameter(s) # noqa: E501 Test form parameter(s) # noqa: E501 @@ -209,7 +221,16 @@ class FormApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_form_oneof(self, form1 : Optional[StrictStr] = None, form2 : Optional[StrictInt] = None, form3 : Optional[StrictStr] = None, form4 : Optional[StrictBool] = None, id : Optional[StrictInt] = None, name : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_form_oneof( + self, + form1: Optional[StrictStr] = None, + form2: Optional[StrictInt] = None, + form3: Optional[StrictStr] = None, + form4: Optional[StrictBool] = None, + id: Optional[StrictInt] = None, + name: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test form parameter(s) for oneOf schema # noqa: E501 Test form parameter(s) for oneOf schema # noqa: E501 @@ -249,7 +270,16 @@ class FormApi: return self.test_form_oneof_with_http_info(form1, form2, form3, form4, id, name, **kwargs) # noqa: E501 @validate_call - def test_form_oneof_with_http_info(self, form1 : Optional[StrictStr] = None, form2 : Optional[StrictInt] = None, form3 : Optional[StrictStr] = None, form4 : Optional[StrictBool] = None, id : Optional[StrictInt] = None, name : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_form_oneof_with_http_info( + self, + form1: Optional[StrictStr] = None, + form2: Optional[StrictInt] = None, + form3: Optional[StrictStr] = None, + form4: Optional[StrictBool] = None, + id: Optional[StrictInt] = None, + name: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test form parameter(s) for oneOf schema # noqa: E501 Test form parameter(s) for oneOf schema # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/header_api.py b/samples/client/echo_api/python/openapi_client/api/header_api.py index 1bdcd42cbd3..624db27756d 100644 --- a/samples/client/echo_api/python/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python/openapi_client/api/header_api.py @@ -47,7 +47,15 @@ class HeaderApi: self.api_client = api_client @validate_call - def test_header_integer_boolean_string_enums(self, integer_header : Optional[StrictInt] = None, boolean_header : Optional[StrictBool] = None, string_header : Optional[StrictStr] = None, enum_nonref_string_header : Optional[StrictStr] = None, enum_ref_string_header : Optional[StringEnumRef] = None, **kwargs) -> str: # noqa: E501 + def test_header_integer_boolean_string_enums( + self, + integer_header: Optional[StrictInt] = None, + boolean_header: Optional[StrictBool] = None, + string_header: Optional[StrictStr] = None, + enum_nonref_string_header: Optional[StrictStr] = None, + enum_ref_string_header: Optional[StringEnumRef] = None, + **kwargs, + ) -> str: """Test header parameter(s) # noqa: E501 Test header parameter(s) # noqa: E501 @@ -85,7 +93,15 @@ class HeaderApi: return self.test_header_integer_boolean_string_enums_with_http_info(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, **kwargs) # noqa: E501 @validate_call - def test_header_integer_boolean_string_enums_with_http_info(self, integer_header : Optional[StrictInt] = None, boolean_header : Optional[StrictBool] = None, string_header : Optional[StrictStr] = None, enum_nonref_string_header : Optional[StrictStr] = None, enum_ref_string_header : Optional[StringEnumRef] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_header_integer_boolean_string_enums_with_http_info( + self, + integer_header: Optional[StrictInt] = None, + boolean_header: Optional[StrictBool] = None, + string_header: Optional[StrictStr] = None, + enum_nonref_string_header: Optional[StrictStr] = None, + enum_ref_string_header: Optional[StringEnumRef] = None, + **kwargs, + ) -> ApiResponse: """Test header parameter(s) # noqa: E501 Test header parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/path_api.py b/samples/client/echo_api/python/openapi_client/api/path_api.py index ab4f5ecb4d4..6417c355f41 100644 --- a/samples/client/echo_api/python/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python/openapi_client/api/path_api.py @@ -45,7 +45,14 @@ class PathApi: self.api_client = api_client @validate_call - def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path(self, path_string : StrictStr, path_integer : StrictInt, enum_nonref_string_path : StrictStr, enum_ref_string_path : StringEnumRef, **kwargs) -> str: # noqa: E501 + def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path( + self, + path_string: StrictStr, + path_integer: StrictInt, + enum_nonref_string_path: StrictStr, + enum_ref_string_path: StringEnumRef, + **kwargs, + ) -> str: """Test path parameter(s) # noqa: E501 Test path parameter(s) # noqa: E501 @@ -81,7 +88,14 @@ class PathApi: return self.tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, **kwargs) # noqa: E501 @validate_call - def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(self, path_string : StrictStr, path_integer : StrictInt, enum_nonref_string_path : StrictStr, enum_ref_string_path : StringEnumRef, **kwargs) -> ApiResponse: # noqa: E501 + def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info( + self, + path_string: StrictStr, + path_integer: StrictInt, + enum_nonref_string_path: StrictStr, + enum_ref_string_path: StringEnumRef, + **kwargs, + ) -> ApiResponse: """Test path parameter(s) # noqa: E501 Test path parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python/openapi_client/api/query_api.py b/samples/client/echo_api/python/openapi_client/api/query_api.py index 123998aa92b..f7bdff291c8 100644 --- a/samples/client/echo_api/python/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python/openapi_client/api/query_api.py @@ -51,7 +51,12 @@ class QueryApi: self.api_client = api_client @validate_call - def test_enum_ref_string(self, enum_nonref_string_query : Optional[StrictStr] = None, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs) -> str: # noqa: E501 + def test_enum_ref_string( + self, + enum_nonref_string_query: Optional[StrictStr] = None, + enum_ref_string_query: Optional[StringEnumRef] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -83,7 +88,12 @@ class QueryApi: return self.test_enum_ref_string_with_http_info(enum_nonref_string_query, enum_ref_string_query, **kwargs) # noqa: E501 @validate_call - def test_enum_ref_string_with_http_info(self, enum_nonref_string_query : Optional[StrictStr] = None, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_enum_ref_string_with_http_info( + self, + enum_nonref_string_query: Optional[StrictStr] = None, + enum_ref_string_query: Optional[StringEnumRef] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -199,7 +209,13 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_datetime_date_string(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_query_datetime_date_string( + self, + datetime_query: Optional[datetime] = None, + date_query: Optional[date] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -233,7 +249,13 @@ class QueryApi: return self.test_query_datetime_date_string_with_http_info(datetime_query, date_query, string_query, **kwargs) # noqa: E501 @validate_call - def test_query_datetime_date_string_with_http_info(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_datetime_date_string_with_http_info( + self, + datetime_query: Optional[datetime] = None, + date_query: Optional[date] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -361,7 +383,13 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_integer_boolean_string(self, integer_query : Optional[StrictInt] = None, boolean_query : Optional[StrictBool] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501 + def test_query_integer_boolean_string( + self, + integer_query: Optional[StrictInt] = None, + boolean_query: Optional[StrictBool] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -395,7 +423,13 @@ class QueryApi: return self.test_query_integer_boolean_string_with_http_info(integer_query, boolean_query, string_query, **kwargs) # noqa: E501 @validate_call - def test_query_integer_boolean_string_with_http_info(self, integer_query : Optional[StrictInt] = None, boolean_query : Optional[StrictBool] = None, string_query : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_integer_boolean_string_with_http_info( + self, + integer_query: Optional[StrictInt] = None, + boolean_query: Optional[StrictBool] = None, + string_query: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -517,7 +551,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_deep_object_explode_true_object(self, query_object : Optional[Pet] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_deep_object_explode_true_object( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -547,7 +585,11 @@ class QueryApi: return self.test_query_style_deep_object_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_deep_object_explode_true_object_with_http_info(self, query_object : Optional[Pet] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_deep_object_explode_true_object_with_http_info( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -657,7 +699,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_deep_object_explode_true_object_all_of(self, query_object : Optional[Any] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_deep_object_explode_true_object_all_of( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -687,7 +733,11 @@ class QueryApi: return self.test_query_style_deep_object_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_deep_object_explode_true_object_all_of_with_http_info(self, query_object : Optional[Any] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_deep_object_explode_true_object_all_of_with_http_info( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -797,7 +847,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_array_string(self, query_object : Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_array_string( + self, + query_object: Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -827,7 +881,11 @@ class QueryApi: return self.test_query_style_form_explode_true_array_string_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_array_string_with_http_info(self, query_object : Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_array_string_with_http_info( + self, + query_object: Optional[TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -937,7 +995,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_object(self, query_object : Optional[Pet] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_object( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -967,7 +1029,11 @@ class QueryApi: return self.test_query_style_form_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_object_with_http_info(self, query_object : Optional[Pet] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_object_with_http_info( + self, + query_object: Optional[Pet] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -1077,7 +1143,11 @@ class QueryApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_style_form_explode_true_object_all_of(self, query_object : Optional[Any] = None, **kwargs) -> str: # noqa: E501 + def test_query_style_form_explode_true_object_all_of( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> str: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 @@ -1107,7 +1177,11 @@ class QueryApi: return self.test_query_style_form_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501 @validate_call - def test_query_style_form_explode_true_object_all_of_with_http_info(self, query_object : Optional[Any] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_style_form_explode_true_object_all_of_with_http_info( + self, + query_object: Optional[Any] = None, + **kwargs, + ) -> ApiResponse: """Test query parameter(s) # noqa: E501 Test query parameter(s) # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py index 9d016f3d9af..86387007943 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py @@ -44,7 +44,11 @@ class AnotherFakeApi: self.api_client = api_client @validate_call - async def call_123_test_special_tags(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + async def call_123_test_special_tags( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 @@ -67,7 +71,11 @@ class AnotherFakeApi: return await self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 @validate_call - async def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def call_123_test_special_tags_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py index cf5d0199243..f9e3faf19f0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py @@ -42,7 +42,10 @@ class DefaultApi: self.api_client = api_client @validate_call - async def foo_get(self, **kwargs) -> FooGetDefaultResponse: # noqa: E501 + async def foo_get( + self, + **kwargs, + ) -> FooGetDefaultResponse: """foo_get # noqa: E501 @@ -62,7 +65,10 @@ class DefaultApi: return await self.foo_get_with_http_info(**kwargs) # noqa: E501 @validate_call - async def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def foo_get_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """foo_get # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index deda0df4eb8..1df6cfee9f2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -59,7 +59,11 @@ class FakeApi: self.api_client = api_client @validate_call - async def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501 + async def fake_any_type_request_body( + self, + body: Optional[Dict[str, Any]] = None, + **kwargs, + ) -> None: """test any type request body # noqa: E501 @@ -81,7 +85,11 @@ class FakeApi: return await self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501 @validate_call - async def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_any_type_request_body_with_http_info( + self, + body: Optional[Dict[str, Any]] = None, + **kwargs, + ) -> ApiResponse: """test any type request body # noqa: E501 @@ -182,7 +190,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501 + async def fake_enum_ref_query_parameter( + self, + enum_ref: Annotated[Optional[EnumClass], Field(description="enum reference")] = None, + **kwargs, + ) -> None: """test enum reference query parameter # noqa: E501 @@ -204,7 +216,11 @@ class FakeApi: return await self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501 @validate_call - async def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_enum_ref_query_parameter_with_http_info( + self, + enum_ref: Annotated[Optional[EnumClass], Field(description="enum reference")] = None, + **kwargs, + ) -> ApiResponse: """test enum reference query parameter # noqa: E501 @@ -298,7 +314,10 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501 + async def fake_health_get( + self, + **kwargs, + ) -> HealthCheckResult: """Health check endpoint # noqa: E501 @@ -318,7 +337,10 @@ class FakeApi: return await self.fake_health_get_with_http_info(**kwargs) # noqa: E501 @validate_call - async def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_health_get_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Health check endpoint # noqa: E501 @@ -412,7 +434,13 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_http_signature_test(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> None: # noqa: E501 + async def fake_http_signature_test( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + query_1: Annotated[Optional[StrictStr], Field(description="query parameter")] = None, + header_1: Annotated[Optional[StrictStr], Field(description="header parameter")] = None, + **kwargs, + ) -> None: """test http signature authentication # noqa: E501 @@ -438,7 +466,13 @@ class FakeApi: return await self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501 @validate_call - async def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_http_signature_test_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + query_1: Annotated[Optional[StrictStr], Field(description="query parameter")] = None, + header_1: Annotated[Optional[StrictStr], Field(description="header parameter")] = None, + **kwargs, + ) -> ApiResponse: """test http signature authentication # noqa: E501 @@ -551,7 +585,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> bool: # noqa: E501 + async def fake_outer_boolean_serialize( + self, + body: Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, + **kwargs, + ) -> bool: """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -574,7 +612,11 @@ class FakeApi: return await self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - async def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_boolean_serialize_with_http_info( + self, + body: Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -682,7 +724,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> OuterComposite: # noqa: E501 + async def fake_outer_composite_serialize( + self, + outer_composite: Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, + **kwargs, + ) -> OuterComposite: """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -705,7 +751,11 @@ class FakeApi: return await self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501 @validate_call - async def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_composite_serialize_with_http_info( + self, + outer_composite: Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -813,7 +863,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> float: # noqa: E501 + async def fake_outer_number_serialize( + self, + body: Annotated[Optional[float], Field(description="Input number as post body")] = None, + **kwargs, + ) -> float: """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -836,7 +890,11 @@ class FakeApi: return await self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - async def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_number_serialize_with_http_info( + self, + body: Annotated[Optional[float], Field(description="Input number as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -944,7 +1002,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> str: # noqa: E501 + async def fake_outer_string_serialize( + self, + body: Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, + **kwargs, + ) -> str: """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -967,7 +1029,11 @@ class FakeApi: return await self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - async def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_string_serialize_with_http_info( + self, + body: Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -1075,7 +1141,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 + async def fake_property_enum_integer_serialize( + self, + outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + **kwargs, + ) -> OuterObjectWithEnumProperty: """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 @@ -1098,7 +1168,11 @@ class FakeApi: return await self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 @validate_call - async def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 + async def fake_property_enum_integer_serialize_with_http_info( + self, + outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + **kwargs, + ) -> ApiResponse: """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 @@ -1206,7 +1280,10 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 + async def fake_return_list_of_objects( + self, + **kwargs, + ) -> List[List[Tag]]: """test returning list of objects # noqa: E501 @@ -1226,7 +1303,10 @@ class FakeApi: return await self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501 @validate_call - async def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_return_list_of_objects_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """test returning list of objects # noqa: E501 @@ -1320,7 +1400,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(description="uuid example")], **kwargs) -> None: # noqa: E501 + async def fake_uuid_example( + self, + uuid_example: Annotated[StrictStr, Field(description="uuid example")], + **kwargs, + ) -> None: """test uuid example # noqa: E501 @@ -1342,7 +1426,11 @@ class FakeApi: return await self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 @validate_call - async def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, Field(description="uuid example")], **kwargs) -> ApiResponse: # noqa: E501 + async def fake_uuid_example_with_http_info( + self, + uuid_example: Annotated[StrictStr, Field(description="uuid example")], + **kwargs, + ) -> ApiResponse: """test uuid example # noqa: E501 @@ -1436,7 +1524,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], **kwargs) -> None: # noqa: E501 + async def test_body_with_binary( + self, + body: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], + **kwargs, + ) -> None: """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 @@ -1459,7 +1551,11 @@ class FakeApi: return await self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501 @validate_call - async def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_binary_with_http_info( + self, + body: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], + **kwargs, + ) -> ApiResponse: """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 @@ -1566,7 +1662,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> None: # noqa: E501 + async def test_body_with_file_schema( + self, + file_schema_test_class: FileSchemaTestClass, + **kwargs, + ) -> None: """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 @@ -1589,7 +1689,11 @@ class FakeApi: return await self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 @validate_call - async def test_body_with_file_schema_with_http_info(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_file_schema_with_http_info( + self, + file_schema_test_class: FileSchemaTestClass, + **kwargs, + ) -> ApiResponse: """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 @@ -1691,7 +1795,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_body_with_query_params(self, query : StrictStr, user : User, **kwargs) -> None: # noqa: E501 + async def test_body_with_query_params( + self, + query: StrictStr, + user: User, + **kwargs, + ) -> None: """test_body_with_query_params # noqa: E501 @@ -1715,7 +1824,12 @@ class FakeApi: return await self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 @validate_call - async def test_body_with_query_params_with_http_info(self, query : StrictStr, user : User, **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_query_params_with_http_info( + self, + query: StrictStr, + user: User, + **kwargs, + ) -> ApiResponse: """test_body_with_query_params # noqa: E501 @@ -1822,7 +1936,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_client_model(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + async def test_client_model( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -1845,7 +1963,11 @@ class FakeApi: return await self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 @validate_call - async def test_client_model_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_client_model_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -1953,7 +2075,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> None: # noqa: E501 + async def test_date_time_query_parameter( + self, + date_time_query: datetime, + str_query: StrictStr, + **kwargs, + ) -> None: """test_date_time_query_parameter # noqa: E501 @@ -1977,7 +2104,12 @@ class FakeApi: return await self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501 @validate_call - async def test_date_time_query_parameter_with_http_info(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + async def test_date_time_query_parameter_with_http_info( + self, + date_time_query: datetime, + str_query: StrictStr, + **kwargs, + ) -> ApiResponse: """test_date_time_query_parameter # noqa: E501 @@ -2080,7 +2212,25 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 + async def test_endpoint_parameters( + self, + number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + **kwargs, + ) -> None: """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2131,7 +2281,25 @@ class FakeApi: return await self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501 @validate_call - async def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_endpoint_parameters_with_http_info( + self, + number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + **kwargs, + ) -> ApiResponse: """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2317,7 +2485,16 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 + async def test_group_parameters( + self, + required_string_group: Annotated[StrictInt, Field(description="Required String in group parameters")], + required_boolean_group: Annotated[StrictBool, Field(description="Required Boolean in group parameters")], + required_int64_group: Annotated[StrictInt, Field(description="Required Integer in group parameters")], + string_group: Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, + boolean_group: Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, + int64_group: Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, + **kwargs, + ) -> None: """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -2350,7 +2527,16 @@ class FakeApi: return await self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501 @validate_call - async def test_group_parameters_with_http_info(self, required_string_group : Annotated[StrictInt, Field(description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_group_parameters_with_http_info( + self, + required_string_group: Annotated[StrictInt, Field(description="Required String in group parameters")], + required_boolean_group: Annotated[StrictBool, Field(description="Required Boolean in group parameters")], + required_int64_group: Annotated[StrictInt, Field(description="Required Integer in group parameters")], + string_group: Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, + boolean_group: Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, + int64_group: Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, + **kwargs, + ) -> ApiResponse: """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -2475,7 +2661,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(description="request body")], **kwargs) -> None: # noqa: E501 + async def test_inline_additional_properties( + self, + request_body: Annotated[Dict[str, StrictStr], Field(description="request body")], + **kwargs, + ) -> None: """test inline additionalProperties # noqa: E501 # noqa: E501 @@ -2498,7 +2688,11 @@ class FakeApi: return await self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 @validate_call - async def test_inline_additional_properties_with_http_info(self, request_body : Annotated[Dict[str, StrictStr], Field(description="request body")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_inline_additional_properties_with_http_info( + self, + request_body: Annotated[Dict[str, StrictStr], Field(description="request body")], + **kwargs, + ) -> ApiResponse: """test inline additionalProperties # noqa: E501 # noqa: E501 @@ -2600,7 +2794,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_inline_freeform_additional_properties(self, test_inline_freeform_additional_properties_request : Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], **kwargs) -> None: # noqa: E501 + async def test_inline_freeform_additional_properties( + self, + test_inline_freeform_additional_properties_request: Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], + **kwargs, + ) -> None: """test inline free-form additionalProperties # noqa: E501 # noqa: E501 @@ -2623,7 +2821,11 @@ class FakeApi: return await self.test_inline_freeform_additional_properties_with_http_info(test_inline_freeform_additional_properties_request, **kwargs) # noqa: E501 @validate_call - async def test_inline_freeform_additional_properties_with_http_info(self, test_inline_freeform_additional_properties_request : Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_inline_freeform_additional_properties_with_http_info( + self, + test_inline_freeform_additional_properties_request: Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], + **kwargs, + ) -> ApiResponse: """test inline free-form additionalProperties # noqa: E501 # noqa: E501 @@ -2725,7 +2927,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_json_form_data(self, param : Annotated[StrictStr, Field(description="field1")], param2 : Annotated[StrictStr, Field(description="field2")], **kwargs) -> None: # noqa: E501 + async def test_json_form_data( + self, + param: Annotated[StrictStr, Field(description="field1")], + param2: Annotated[StrictStr, Field(description="field2")], + **kwargs, + ) -> None: """test json serialization of form data # noqa: E501 # noqa: E501 @@ -2750,7 +2957,12 @@ class FakeApi: return await self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 @validate_call - async def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field(description="field1")], param2 : Annotated[StrictStr, Field(description="field2")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_json_form_data_with_http_info( + self, + param: Annotated[StrictStr, Field(description="field1")], + param2: Annotated[StrictStr, Field(description="field2")], + **kwargs, + ) -> ApiResponse: """test json serialization of form data # noqa: E501 # noqa: E501 @@ -2858,7 +3070,17 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - async def test_query_parameter_collection_format(self, pipe : List[StrictStr], ioutil : List[StrictStr], http : List[StrictStr], url : List[StrictStr], context : List[StrictStr], allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> None: # noqa: E501 + async def test_query_parameter_collection_format( + self, + pipe: List[StrictStr], + ioutil: List[StrictStr], + http: List[StrictStr], + url: List[StrictStr], + context: List[StrictStr], + allow_empty: StrictStr, + language: Optional[Dict[str, StrictStr]] = None, + **kwargs, + ) -> None: """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 @@ -2893,7 +3115,17 @@ class FakeApi: return await self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501 @validate_call - async def test_query_parameter_collection_format_with_http_info(self, pipe : List[StrictStr], ioutil : List[StrictStr], http : List[StrictStr], url : List[StrictStr], context : List[StrictStr], allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_query_parameter_collection_format_with_http_info( + self, + pipe: List[StrictStr], + ioutil: List[StrictStr], + http: List[StrictStr], + url: List[StrictStr], + context: List[StrictStr], + allow_empty: StrictStr, + language: Optional[Dict[str, StrictStr]] = None, + **kwargs, + ) -> ApiResponse: """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py index 3c782d89e69..08e09a7d2bf 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py @@ -44,7 +44,11 @@ class FakeClassnameTags123Api: self.api_client = api_client @validate_call - async def test_classname(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + async def test_classname( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 @@ -67,7 +71,11 @@ class FakeClassnameTags123Api: return await self.test_classname_with_http_info(client, **kwargs) # noqa: E501 @validate_call - async def test_classname_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_classname_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py index 5de5b2cbf9f..c8b9f9b8554 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py @@ -49,7 +49,11 @@ class PetApi: self.api_client = api_client @validate_call - async def add_pet(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 + async def add_pet( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> None: """Add a new pet to the store # noqa: E501 # noqa: E501 @@ -72,7 +76,11 @@ class PetApi: return await self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - async def add_pet_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + async def add_pet_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> ApiResponse: """Add a new pet to the store # noqa: E501 # noqa: E501 @@ -174,7 +182,12 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def delete_pet(self, pet_id : Annotated[StrictInt, Field(description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + async def delete_pet( + self, + pet_id: Annotated[StrictInt, Field(description="Pet id to delete")], + api_key: Optional[StrictStr] = None, + **kwargs, + ) -> None: """Deletes a pet # noqa: E501 # noqa: E501 @@ -199,7 +212,12 @@ class PetApi: return await self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501 @validate_call - async def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def delete_pet_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="Pet id to delete")], + api_key: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Deletes a pet # noqa: E501 # noqa: E501 @@ -300,7 +318,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def find_pets_by_status(self, status : Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], **kwargs) -> List[Pet]: # noqa: E501 + async def find_pets_by_status( + self, + status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], + **kwargs, + ) -> List[Pet]: """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -323,7 +345,11 @@ class PetApi: return await self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 @validate_call - async def find_pets_by_status_with_http_info(self, status : Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], **kwargs) -> ApiResponse: # noqa: E501 + async def find_pets_by_status_with_http_info( + self, + status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], + **kwargs, + ) -> ApiResponse: """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -426,7 +452,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def find_pets_by_tags(self, tags : Annotated[List[StrictStr], Field(description="Tags to filter by")], **kwargs) -> List[Pet]: # noqa: E501 + async def find_pets_by_tags( + self, + tags: Annotated[List[StrictStr], Field(description="Tags to filter by")], + **kwargs, + ) -> List[Pet]: """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -449,7 +479,11 @@ class PetApi: return await self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 @validate_call - async def find_pets_by_tags_with_http_info(self, tags : Annotated[List[StrictStr], Field(description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501 + async def find_pets_by_tags_with_http_info( + self, + tags: Annotated[List[StrictStr], Field(description="Tags to filter by")], + **kwargs, + ) -> ApiResponse: """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -554,7 +588,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to return")], **kwargs) -> Pet: # noqa: E501 + async def get_pet_by_id( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to return")], + **kwargs, + ) -> Pet: """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -577,7 +615,11 @@ class PetApi: return await self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 @validate_call - async def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to return")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_pet_by_id_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to return")], + **kwargs, + ) -> ApiResponse: """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -680,7 +722,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def update_pet(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 + async def update_pet( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> None: """Update an existing pet # noqa: E501 # noqa: E501 @@ -703,7 +749,11 @@ class PetApi: return await self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - async def update_pet_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + async def update_pet_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> ApiResponse: """Update an existing pet # noqa: E501 # noqa: E501 @@ -805,7 +855,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> None: # noqa: E501 + async def update_pet_with_form( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], + name: Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, + status: Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, + **kwargs, + ) -> None: """Updates a pet in the store with form data # noqa: E501 # noqa: E501 @@ -832,7 +888,13 @@ class PetApi: return await self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501 @validate_call - async def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def update_pet_with_form_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], + name: Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, + status: Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, + **kwargs, + ) -> ApiResponse: """Updates a pet in the store with form data # noqa: E501 # noqa: E501 @@ -946,7 +1008,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def upload_file(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image # noqa: E501 # noqa: E501 @@ -973,7 +1041,13 @@ class PetApi: return await self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501 @validate_call - async def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image # noqa: E501 # noqa: E501 @@ -1093,7 +1167,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - async def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file_with_required_file( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + required_file: Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image (required) # noqa: E501 # noqa: E501 @@ -1120,7 +1200,13 @@ class PetApi: return await self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501 @validate_call - async def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file_with_required_file_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + required_file: Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image (required) # noqa: E501 # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py index 88101977bea..be8a7fae64e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py @@ -48,7 +48,11 @@ class StoreApi: self.api_client = api_client @validate_call - async def delete_order(self, order_id : Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], **kwargs) -> None: # noqa: E501 + async def delete_order( + self, + order_id: Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], + **kwargs, + ) -> None: """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -71,7 +75,11 @@ class StoreApi: return await self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 @validate_call - async def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + async def delete_order_with_http_info( + self, + order_id: Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], + **kwargs, + ) -> ApiResponse: """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -166,7 +174,10 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - async def get_inventory(self, **kwargs) -> Dict[str, int]: # noqa: E501 + async def get_inventory( + self, + **kwargs, + ) -> Dict[str, int]: """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -187,7 +198,10 @@ class StoreApi: return await self.get_inventory_with_http_info(**kwargs) # noqa: E501 @validate_call - async def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def get_inventory_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -282,7 +296,11 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - async def get_order_by_id(self, order_id : Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], **kwargs) -> Order: # noqa: E501 + async def get_order_by_id( + self, + order_id: Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], + **kwargs, + ) -> Order: """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -305,7 +323,11 @@ class StoreApi: return await self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 @validate_call - async def get_order_by_id_with_http_info(self, order_id : Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_order_by_id_with_http_info( + self, + order_id: Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], + **kwargs, + ) -> ApiResponse: """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -408,7 +430,11 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - async def place_order(self, order : Annotated[Order, Field(description="order placed for purchasing the pet")], **kwargs) -> Order: # noqa: E501 + async def place_order( + self, + order: Annotated[Order, Field(description="order placed for purchasing the pet")], + **kwargs, + ) -> Order: """Place an order for a pet # noqa: E501 # noqa: E501 @@ -431,7 +457,11 @@ class StoreApi: return await self.place_order_with_http_info(order, **kwargs) # noqa: E501 @validate_call - async def place_order_with_http_info(self, order : Annotated[Order, Field(description="order placed for purchasing the pet")], **kwargs) -> ApiResponse: # noqa: E501 + async def place_order_with_http_info( + self, + order: Annotated[Order, Field(description="order placed for purchasing the pet")], + **kwargs, + ) -> ApiResponse: """Place an order for a pet # noqa: E501 # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py index 68325c28b98..f46646c8252 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py @@ -48,7 +48,11 @@ class UserApi: self.api_client = api_client @validate_call - async def create_user(self, user : Annotated[User, Field(description="Created user object")], **kwargs) -> None: # noqa: E501 + async def create_user( + self, + user: Annotated[User, Field(description="Created user object")], + **kwargs, + ) -> None: """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -71,7 +75,11 @@ class UserApi: return await self.create_user_with_http_info(user, **kwargs) # noqa: E501 @validate_call - async def create_user_with_http_info(self, user : Annotated[User, Field(description="Created user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_user_with_http_info( + self, + user: Annotated[User, Field(description="Created user object")], + **kwargs, + ) -> ApiResponse: """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -188,7 +196,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def create_users_with_array_input(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> None: # noqa: E501 + async def create_users_with_array_input( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> None: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -211,7 +223,11 @@ class UserApi: return await self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 @validate_call - async def create_users_with_array_input_with_http_info(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_users_with_array_input_with_http_info( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> ApiResponse: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -313,7 +329,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def create_users_with_list_input(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> None: # noqa: E501 + async def create_users_with_list_input( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> None: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -336,7 +356,11 @@ class UserApi: return await self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 @validate_call - async def create_users_with_list_input_with_http_info(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_users_with_list_input_with_http_info( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> ApiResponse: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -438,7 +462,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def delete_user(self, username : Annotated[StrictStr, Field(description="The name that needs to be deleted")], **kwargs) -> None: # noqa: E501 + async def delete_user( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be deleted")], + **kwargs, + ) -> None: """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -461,7 +489,11 @@ class UserApi: return await self.delete_user_with_http_info(username, **kwargs) # noqa: E501 @validate_call - async def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(description="The name that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + async def delete_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be deleted")], + **kwargs, + ) -> ApiResponse: """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -556,7 +588,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def get_user_by_name(self, username : Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> User: # noqa: E501 + async def get_user_by_name( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], + **kwargs, + ) -> User: """Get user by user name # noqa: E501 # noqa: E501 @@ -579,7 +615,11 @@ class UserApi: return await self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 @validate_call - async def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_user_by_name_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], + **kwargs, + ) -> ApiResponse: """Get user by user name # noqa: E501 # noqa: E501 @@ -682,7 +722,12 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def login_user(self, username : Annotated[StrictStr, Field(description="The user name for login")], password : Annotated[StrictStr, Field(description="The password for login in clear text")], **kwargs) -> str: # noqa: E501 + async def login_user( + self, + username: Annotated[StrictStr, Field(description="The user name for login")], + password: Annotated[StrictStr, Field(description="The password for login in clear text")], + **kwargs, + ) -> str: """Logs user into the system # noqa: E501 # noqa: E501 @@ -707,7 +752,12 @@ class UserApi: return await self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 @validate_call - async def login_user_with_http_info(self, username : Annotated[StrictStr, Field(description="The user name for login")], password : Annotated[StrictStr, Field(description="The password for login in clear text")], **kwargs) -> ApiResponse: # noqa: E501 + async def login_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The user name for login")], + password: Annotated[StrictStr, Field(description="The password for login in clear text")], + **kwargs, + ) -> ApiResponse: """Logs user into the system # noqa: E501 # noqa: E501 @@ -815,7 +865,10 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def logout_user(self, **kwargs) -> None: # noqa: E501 + async def logout_user( + self, + **kwargs, + ) -> None: """Logs out current logged in user session # noqa: E501 # noqa: E501 @@ -836,7 +889,10 @@ class UserApi: return await self.logout_user_with_http_info(**kwargs) # noqa: E501 @validate_call - async def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def logout_user_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Logs out current logged in user session # noqa: E501 # noqa: E501 @@ -925,7 +981,12 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - async def update_user(self, username : Annotated[StrictStr, Field(description="name that need to be deleted")], user : Annotated[User, Field(description="Updated user object")], **kwargs) -> None: # noqa: E501 + async def update_user( + self, + username: Annotated[StrictStr, Field(description="name that need to be deleted")], + user: Annotated[User, Field(description="Updated user object")], + **kwargs, + ) -> None: """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -950,7 +1011,12 @@ class UserApi: return await self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 @validate_call - async def update_user_with_http_info(self, username : Annotated[StrictStr, Field(description="name that need to be deleted")], user : Annotated[User, Field(description="Updated user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def update_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="name that need to be deleted")], + user: Annotated[User, Field(description="Updated user object")], + **kwargs, + ) -> ApiResponse: """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 0788b4fa316..71eba1c8225 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -44,7 +44,11 @@ class AnotherFakeApi: self.api_client = api_client @validate_call - def call_123_test_special_tags(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + def call_123_test_special_tags( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 @@ -74,7 +78,11 @@ class AnotherFakeApi: return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 @validate_call - def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + def call_123_test_special_tags_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index 35accb3fe88..dc37230dc39 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -42,7 +42,10 @@ class DefaultApi: self.api_client = api_client @validate_call - def foo_get(self, **kwargs) -> FooGetDefaultResponse: # noqa: E501 + def foo_get( + self, + **kwargs, + ) -> FooGetDefaultResponse: """foo_get # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -69,7 +72,10 @@ class DefaultApi: return self.foo_get_with_http_info(**kwargs) # noqa: E501 @validate_call - def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def foo_get_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """foo_get # noqa: E501 This method makes a synchronous HTTP request by default. To make an diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 55795db13e4..508c4b64a87 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -59,7 +59,11 @@ class FakeApi: self.api_client = api_client @validate_call - def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501 + def fake_any_type_request_body( + self, + body: Optional[Dict[str, Any]] = None, + **kwargs, + ) -> None: """test any type request body # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -88,7 +92,11 @@ class FakeApi: return self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_any_type_request_body_with_http_info( + self, + body: Optional[Dict[str, Any]] = None, + **kwargs, + ) -> ApiResponse: """test any type request body # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -198,7 +206,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501 + def fake_enum_ref_query_parameter( + self, + enum_ref: Annotated[Optional[EnumClass], Field(description="enum reference")] = None, + **kwargs, + ) -> None: """test enum reference query parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -227,7 +239,11 @@ class FakeApi: return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501 @validate_call - def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_enum_ref_query_parameter_with_http_info( + self, + enum_ref: Annotated[Optional[EnumClass], Field(description="enum reference")] = None, + **kwargs, + ) -> ApiResponse: """test enum reference query parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -330,7 +346,10 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501 + def fake_health_get( + self, + **kwargs, + ) -> HealthCheckResult: """Health check endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -357,7 +376,10 @@ class FakeApi: return self.fake_health_get_with_http_info(**kwargs) # noqa: E501 @validate_call - def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def fake_health_get_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Health check endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -460,7 +482,13 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_http_signature_test(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> None: # noqa: E501 + def fake_http_signature_test( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + query_1: Annotated[Optional[StrictStr], Field(description="query parameter")] = None, + header_1: Annotated[Optional[StrictStr], Field(description="header parameter")] = None, + **kwargs, + ) -> None: """test http signature authentication # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -493,7 +521,13 @@ class FakeApi: return self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501 @validate_call - def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_http_signature_test_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + query_1: Annotated[Optional[StrictStr], Field(description="query parameter")] = None, + header_1: Annotated[Optional[StrictStr], Field(description="header parameter")] = None, + **kwargs, + ) -> ApiResponse: """test http signature authentication # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -615,7 +649,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> bool: # noqa: E501 + def fake_outer_boolean_serialize( + self, + body: Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, + **kwargs, + ) -> bool: """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -645,7 +683,11 @@ class FakeApi: return self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_outer_boolean_serialize_with_http_info( + self, + body: Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -762,7 +804,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> OuterComposite: # noqa: E501 + def fake_outer_composite_serialize( + self, + outer_composite: Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, + **kwargs, + ) -> OuterComposite: """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -792,7 +838,11 @@ class FakeApi: return self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501 @validate_call - def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_outer_composite_serialize_with_http_info( + self, + outer_composite: Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -909,7 +959,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_outer_number_serialize(self, body : Annotated[Optional[StrictFloat], Field(description="Input number as post body")] = None, **kwargs) -> float: # noqa: E501 + def fake_outer_number_serialize( + self, + body: Annotated[Optional[StrictFloat], Field(description="Input number as post body")] = None, + **kwargs, + ) -> float: """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -939,7 +993,11 @@ class FakeApi: return self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[StrictFloat], Field(description="Input number as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_outer_number_serialize_with_http_info( + self, + body: Annotated[Optional[StrictFloat], Field(description="Input number as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -1056,7 +1114,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> str: # noqa: E501 + def fake_outer_string_serialize( + self, + body: Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, + **kwargs, + ) -> str: """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -1086,7 +1148,11 @@ class FakeApi: return self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def fake_outer_string_serialize_with_http_info( + self, + body: Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, + **kwargs, + ) -> ApiResponse: """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -1203,7 +1269,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 + def fake_property_enum_integer_serialize( + self, + outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + **kwargs, + ) -> OuterObjectWithEnumProperty: """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 @@ -1233,7 +1303,11 @@ class FakeApi: return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 @validate_call - def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 + def fake_property_enum_integer_serialize_with_http_info( + self, + outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + **kwargs, + ) -> ApiResponse: """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 @@ -1350,7 +1424,10 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 + def fake_return_list_of_objects( + self, + **kwargs, + ) -> List[List[Tag]]: """test returning list of objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1377,7 +1454,10 @@ class FakeApi: return self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501 @validate_call - def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def fake_return_list_of_objects_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """test returning list of objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1480,7 +1560,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(description="uuid example")], **kwargs) -> None: # noqa: E501 + def fake_uuid_example( + self, + uuid_example: Annotated[StrictStr, Field(description="uuid example")], + **kwargs, + ) -> None: """test uuid example # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1509,7 +1593,11 @@ class FakeApi: return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 @validate_call - def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, Field(description="uuid example")], **kwargs) -> ApiResponse: # noqa: E501 + def fake_uuid_example_with_http_info( + self, + uuid_example: Annotated[StrictStr, Field(description="uuid example")], + **kwargs, + ) -> ApiResponse: """test uuid example # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1612,7 +1700,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], **kwargs) -> None: # noqa: E501 + def test_body_with_binary( + self, + body: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], + **kwargs, + ) -> None: """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 @@ -1642,7 +1734,11 @@ class FakeApi: return self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501 @validate_call - def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], **kwargs) -> ApiResponse: # noqa: E501 + def test_body_with_binary_with_http_info( + self, + body: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="image to upload")], + **kwargs, + ) -> ApiResponse: """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 @@ -1758,7 +1854,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> None: # noqa: E501 + def test_body_with_file_schema( + self, + file_schema_test_class: FileSchemaTestClass, + **kwargs, + ) -> None: """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 @@ -1788,7 +1888,11 @@ class FakeApi: return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 @validate_call - def test_body_with_file_schema_with_http_info(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> ApiResponse: # noqa: E501 + def test_body_with_file_schema_with_http_info( + self, + file_schema_test_class: FileSchemaTestClass, + **kwargs, + ) -> ApiResponse: """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 @@ -1899,7 +2003,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_body_with_query_params(self, query : StrictStr, user : User, **kwargs) -> None: # noqa: E501 + def test_body_with_query_params( + self, + query: StrictStr, + user: User, + **kwargs, + ) -> None: """test_body_with_query_params # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1930,7 +2039,12 @@ class FakeApi: return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 @validate_call - def test_body_with_query_params_with_http_info(self, query : StrictStr, user : User, **kwargs) -> ApiResponse: # noqa: E501 + def test_body_with_query_params_with_http_info( + self, + query: StrictStr, + user: User, + **kwargs, + ) -> ApiResponse: """test_body_with_query_params # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2046,7 +2160,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_client_model(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + def test_client_model( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -2076,7 +2194,11 @@ class FakeApi: return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 @validate_call - def test_client_model_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + def test_client_model_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -2193,7 +2315,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> None: # noqa: E501 + def test_date_time_query_parameter( + self, + date_time_query: datetime, + str_query: StrictStr, + **kwargs, + ) -> None: """test_date_time_query_parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2224,7 +2351,12 @@ class FakeApi: return self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501 @validate_call - def test_date_time_query_parameter_with_http_info(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + def test_date_time_query_parameter_with_http_info( + self, + date_time_query: datetime, + str_query: StrictStr, + **kwargs, + ) -> ApiResponse: """test_date_time_query_parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2336,7 +2468,25 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 + def test_endpoint_parameters( + self, + number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + **kwargs, + ) -> None: """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2394,7 +2544,25 @@ class FakeApi: return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501 @validate_call - def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_endpoint_parameters_with_http_info( + self, + number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + **kwargs, + ) -> ApiResponse: """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2589,7 +2757,16 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 + def test_group_parameters( + self, + required_string_group: Annotated[StrictInt, Field(description="Required String in group parameters")], + required_boolean_group: Annotated[StrictBool, Field(description="Required Boolean in group parameters")], + required_int64_group: Annotated[StrictInt, Field(description="Required Integer in group parameters")], + string_group: Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, + boolean_group: Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, + int64_group: Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, + **kwargs, + ) -> None: """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -2629,7 +2806,16 @@ class FakeApi: return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501 @validate_call - def test_group_parameters_with_http_info(self, required_string_group : Annotated[StrictInt, Field(description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_group_parameters_with_http_info( + self, + required_string_group: Annotated[StrictInt, Field(description="Required String in group parameters")], + required_boolean_group: Annotated[StrictBool, Field(description="Required Boolean in group parameters")], + required_int64_group: Annotated[StrictInt, Field(description="Required Integer in group parameters")], + string_group: Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, + boolean_group: Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, + int64_group: Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, + **kwargs, + ) -> ApiResponse: """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -2763,7 +2949,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(description="request body")], **kwargs) -> None: # noqa: E501 + def test_inline_additional_properties( + self, + request_body: Annotated[Dict[str, StrictStr], Field(description="request body")], + **kwargs, + ) -> None: """test inline additionalProperties # noqa: E501 # noqa: E501 @@ -2793,7 +2983,11 @@ class FakeApi: return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 @validate_call - def test_inline_additional_properties_with_http_info(self, request_body : Annotated[Dict[str, StrictStr], Field(description="request body")], **kwargs) -> ApiResponse: # noqa: E501 + def test_inline_additional_properties_with_http_info( + self, + request_body: Annotated[Dict[str, StrictStr], Field(description="request body")], + **kwargs, + ) -> ApiResponse: """test inline additionalProperties # noqa: E501 # noqa: E501 @@ -2904,7 +3098,11 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_inline_freeform_additional_properties(self, test_inline_freeform_additional_properties_request : Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], **kwargs) -> None: # noqa: E501 + def test_inline_freeform_additional_properties( + self, + test_inline_freeform_additional_properties_request: Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], + **kwargs, + ) -> None: """test inline free-form additionalProperties # noqa: E501 # noqa: E501 @@ -2934,7 +3132,11 @@ class FakeApi: return self.test_inline_freeform_additional_properties_with_http_info(test_inline_freeform_additional_properties_request, **kwargs) # noqa: E501 @validate_call - def test_inline_freeform_additional_properties_with_http_info(self, test_inline_freeform_additional_properties_request : Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], **kwargs) -> ApiResponse: # noqa: E501 + def test_inline_freeform_additional_properties_with_http_info( + self, + test_inline_freeform_additional_properties_request: Annotated[TestInlineFreeformAdditionalPropertiesRequest, Field(description="request body")], + **kwargs, + ) -> ApiResponse: """test inline free-form additionalProperties # noqa: E501 # noqa: E501 @@ -3045,7 +3247,12 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_json_form_data(self, param : Annotated[StrictStr, Field(description="field1")], param2 : Annotated[StrictStr, Field(description="field2")], **kwargs) -> None: # noqa: E501 + def test_json_form_data( + self, + param: Annotated[StrictStr, Field(description="field1")], + param2: Annotated[StrictStr, Field(description="field2")], + **kwargs, + ) -> None: """test json serialization of form data # noqa: E501 # noqa: E501 @@ -3077,7 +3284,12 @@ class FakeApi: return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 @validate_call - def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field(description="field1")], param2 : Annotated[StrictStr, Field(description="field2")], **kwargs) -> ApiResponse: # noqa: E501 + def test_json_form_data_with_http_info( + self, + param: Annotated[StrictStr, Field(description="field1")], + param2: Annotated[StrictStr, Field(description="field2")], + **kwargs, + ) -> ApiResponse: """test json serialization of form data # noqa: E501 # noqa: E501 @@ -3194,7 +3406,17 @@ class FakeApi: _request_auth=_params.get('_request_auth')) @validate_call - def test_query_parameter_collection_format(self, pipe : List[StrictStr], ioutil : List[StrictStr], http : List[StrictStr], url : List[StrictStr], context : List[StrictStr], allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> None: # noqa: E501 + def test_query_parameter_collection_format( + self, + pipe: List[StrictStr], + ioutil: List[StrictStr], + http: List[StrictStr], + url: List[StrictStr], + context: List[StrictStr], + allow_empty: StrictStr, + language: Optional[Dict[str, StrictStr]] = None, + **kwargs, + ) -> None: """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 @@ -3236,7 +3458,17 @@ class FakeApi: return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501 @validate_call - def test_query_parameter_collection_format_with_http_info(self, pipe : List[StrictStr], ioutil : List[StrictStr], http : List[StrictStr], url : List[StrictStr], context : List[StrictStr], allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + def test_query_parameter_collection_format_with_http_info( + self, + pipe: List[StrictStr], + ioutil: List[StrictStr], + http: List[StrictStr], + url: List[StrictStr], + context: List[StrictStr], + allow_empty: StrictStr, + language: Optional[Dict[str, StrictStr]] = None, + **kwargs, + ) -> ApiResponse: """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py index cbc01511326..bee41dbfb12 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py @@ -44,7 +44,11 @@ class FakeClassnameTags123Api: self.api_client = api_client @validate_call - def test_classname(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> Client: # noqa: E501 + def test_classname( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> Client: """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 @@ -74,7 +78,11 @@ class FakeClassnameTags123Api: return self.test_classname_with_http_info(client, **kwargs) # noqa: E501 @validate_call - def test_classname_with_http_info(self, client : Annotated[Client, Field(description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + def test_classname_with_http_info( + self, + client: Annotated[Client, Field(description="client model")], + **kwargs, + ) -> ApiResponse: """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index d78f6cc9013..a36bfe113de 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -49,7 +49,11 @@ class PetApi: self.api_client = api_client @validate_call - def add_pet(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 + def add_pet( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> None: """Add a new pet to the store # noqa: E501 # noqa: E501 @@ -79,7 +83,11 @@ class PetApi: return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def add_pet_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + def add_pet_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> ApiResponse: """Add a new pet to the store # noqa: E501 # noqa: E501 @@ -190,7 +198,12 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def delete_pet(self, pet_id : Annotated[StrictInt, Field(description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + def delete_pet( + self, + pet_id: Annotated[StrictInt, Field(description="Pet id to delete")], + api_key: Optional[StrictStr] = None, + **kwargs, + ) -> None: """Deletes a pet # noqa: E501 # noqa: E501 @@ -222,7 +235,12 @@ class PetApi: return self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501 @validate_call - def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + def delete_pet_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="Pet id to delete")], + api_key: Optional[StrictStr] = None, + **kwargs, + ) -> ApiResponse: """Deletes a pet # noqa: E501 # noqa: E501 @@ -332,7 +350,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def find_pets_by_status(self, status : Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], **kwargs) -> List[Pet]: # noqa: E501 + def find_pets_by_status( + self, + status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], + **kwargs, + ) -> List[Pet]: """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -362,7 +384,11 @@ class PetApi: return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 @validate_call - def find_pets_by_status_with_http_info(self, status : Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], **kwargs) -> ApiResponse: # noqa: E501 + def find_pets_by_status_with_http_info( + self, + status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")], + **kwargs, + ) -> ApiResponse: """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -474,7 +500,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def find_pets_by_tags(self, tags : Annotated[List[StrictStr], Field(description="Tags to filter by")], **kwargs) -> List[Pet]: # noqa: E501 + def find_pets_by_tags( + self, + tags: Annotated[List[StrictStr], Field(description="Tags to filter by")], + **kwargs, + ) -> List[Pet]: """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -504,7 +534,11 @@ class PetApi: return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 @validate_call - def find_pets_by_tags_with_http_info(self, tags : Annotated[List[StrictStr], Field(description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501 + def find_pets_by_tags_with_http_info( + self, + tags: Annotated[List[StrictStr], Field(description="Tags to filter by")], + **kwargs, + ) -> ApiResponse: """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -618,7 +652,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to return")], **kwargs) -> Pet: # noqa: E501 + def get_pet_by_id( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to return")], + **kwargs, + ) -> Pet: """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -648,7 +686,11 @@ class PetApi: return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 @validate_call - def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to return")], **kwargs) -> ApiResponse: # noqa: E501 + def get_pet_by_id_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to return")], + **kwargs, + ) -> ApiResponse: """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -760,7 +802,11 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def update_pet(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 + def update_pet( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> None: """Update an existing pet # noqa: E501 # noqa: E501 @@ -790,7 +836,11 @@ class PetApi: return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_call - def update_pet_with_http_info(self, pet : Annotated[Pet, Field(description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + def update_pet_with_http_info( + self, + pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")], + **kwargs, + ) -> ApiResponse: """Update an existing pet # noqa: E501 # noqa: E501 @@ -901,7 +951,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> None: # noqa: E501 + def update_pet_with_form( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], + name: Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, + status: Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, + **kwargs, + ) -> None: """Updates a pet in the store with form data # noqa: E501 # noqa: E501 @@ -935,7 +991,13 @@ class PetApi: return self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501 @validate_call - def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def update_pet_with_form_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet that needs to be updated")], + name: Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, + status: Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, + **kwargs, + ) -> ApiResponse: """Updates a pet in the store with form data # noqa: E501 # noqa: E501 @@ -1058,7 +1120,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def upload_file(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def upload_file( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image # noqa: E501 # noqa: E501 @@ -1092,7 +1160,13 @@ class PetApi: return self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501 @validate_call - def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def upload_file_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image # noqa: E501 # noqa: E501 @@ -1221,7 +1295,13 @@ class PetApi: _request_auth=_params.get('_request_auth')) @validate_call - def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def upload_file_with_required_file( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + required_file: Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image (required) # noqa: E501 # noqa: E501 @@ -1255,7 +1335,13 @@ class PetApi: return self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501 @validate_call - def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 + def upload_file_with_required_file_with_http_info( + self, + pet_id: Annotated[StrictInt, Field(description="ID of pet to update")], + required_file: Annotated[Union[StrictBytes, StrictStr], Field(description="file to upload")], + additional_metadata: Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, + **kwargs, + ) -> ApiResponse: """uploads an image (required) # noqa: E501 # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index 028f9797811..ffebbef9cf9 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -48,7 +48,11 @@ class StoreApi: self.api_client = api_client @validate_call - def delete_order(self, order_id : Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], **kwargs) -> None: # noqa: E501 + def delete_order( + self, + order_id: Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], + **kwargs, + ) -> None: """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -78,7 +82,11 @@ class StoreApi: return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 @validate_call - def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + def delete_order_with_http_info( + self, + order_id: Annotated[StrictStr, Field(description="ID of the order that needs to be deleted")], + **kwargs, + ) -> ApiResponse: """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -182,7 +190,10 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - def get_inventory(self, **kwargs) -> Dict[str, int]: # noqa: E501 + def get_inventory( + self, + **kwargs, + ) -> Dict[str, int]: """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -210,7 +221,10 @@ class StoreApi: return self.get_inventory_with_http_info(**kwargs) # noqa: E501 @validate_call - def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def get_inventory_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -314,7 +328,11 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - def get_order_by_id(self, order_id : Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], **kwargs) -> Order: # noqa: E501 + def get_order_by_id( + self, + order_id: Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], + **kwargs, + ) -> Order: """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -344,7 +362,11 @@ class StoreApi: return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 @validate_call - def get_order_by_id_with_http_info(self, order_id : Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], **kwargs) -> ApiResponse: # noqa: E501 + def get_order_by_id_with_http_info( + self, + order_id: Annotated[int, Field(le=5, strict=True, ge=1, description="ID of pet that needs to be fetched")], + **kwargs, + ) -> ApiResponse: """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -456,7 +478,11 @@ class StoreApi: _request_auth=_params.get('_request_auth')) @validate_call - def place_order(self, order : Annotated[Order, Field(description="order placed for purchasing the pet")], **kwargs) -> Order: # noqa: E501 + def place_order( + self, + order: Annotated[Order, Field(description="order placed for purchasing the pet")], + **kwargs, + ) -> Order: """Place an order for a pet # noqa: E501 # noqa: E501 @@ -486,7 +512,11 @@ class StoreApi: return self.place_order_with_http_info(order, **kwargs) # noqa: E501 @validate_call - def place_order_with_http_info(self, order : Annotated[Order, Field(description="order placed for purchasing the pet")], **kwargs) -> ApiResponse: # noqa: E501 + def place_order_with_http_info( + self, + order: Annotated[Order, Field(description="order placed for purchasing the pet")], + **kwargs, + ) -> ApiResponse: """Place an order for a pet # noqa: E501 # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 1a80e27a3ac..8350f8fc69d 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -48,7 +48,11 @@ class UserApi: self.api_client = api_client @validate_call - def create_user(self, user : Annotated[User, Field(description="Created user object")], **kwargs) -> None: # noqa: E501 + def create_user( + self, + user: Annotated[User, Field(description="Created user object")], + **kwargs, + ) -> None: """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -78,7 +82,11 @@ class UserApi: return self.create_user_with_http_info(user, **kwargs) # noqa: E501 @validate_call - def create_user_with_http_info(self, user : Annotated[User, Field(description="Created user object")], **kwargs) -> ApiResponse: # noqa: E501 + def create_user_with_http_info( + self, + user: Annotated[User, Field(description="Created user object")], + **kwargs, + ) -> ApiResponse: """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -204,7 +212,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def create_users_with_array_input(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> None: # noqa: E501 + def create_users_with_array_input( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> None: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -234,7 +246,11 @@ class UserApi: return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 @validate_call - def create_users_with_array_input_with_http_info(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + def create_users_with_array_input_with_http_info( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> ApiResponse: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -345,7 +361,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def create_users_with_list_input(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> None: # noqa: E501 + def create_users_with_list_input( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> None: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -375,7 +395,11 @@ class UserApi: return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 @validate_call - def create_users_with_list_input_with_http_info(self, user : Annotated[List[User], Field(description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + def create_users_with_list_input_with_http_info( + self, + user: Annotated[List[User], Field(description="List of user object")], + **kwargs, + ) -> ApiResponse: """Creates list of users with given input array # noqa: E501 # noqa: E501 @@ -486,7 +510,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def delete_user(self, username : Annotated[StrictStr, Field(description="The name that needs to be deleted")], **kwargs) -> None: # noqa: E501 + def delete_user( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be deleted")], + **kwargs, + ) -> None: """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -516,7 +544,11 @@ class UserApi: return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 @validate_call - def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(description="The name that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + def delete_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be deleted")], + **kwargs, + ) -> ApiResponse: """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -620,7 +652,11 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def get_user_by_name(self, username : Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> User: # noqa: E501 + def get_user_by_name( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], + **kwargs, + ) -> User: """Get user by user name # noqa: E501 # noqa: E501 @@ -650,7 +686,11 @@ class UserApi: return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 @validate_call - def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> ApiResponse: # noqa: E501 + def get_user_by_name_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The name that needs to be fetched. Use user1 for testing.")], + **kwargs, + ) -> ApiResponse: """Get user by user name # noqa: E501 # noqa: E501 @@ -762,7 +802,12 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def login_user(self, username : Annotated[StrictStr, Field(description="The user name for login")], password : Annotated[StrictStr, Field(description="The password for login in clear text")], **kwargs) -> str: # noqa: E501 + def login_user( + self, + username: Annotated[StrictStr, Field(description="The user name for login")], + password: Annotated[StrictStr, Field(description="The password for login in clear text")], + **kwargs, + ) -> str: """Logs user into the system # noqa: E501 # noqa: E501 @@ -794,7 +839,12 @@ class UserApi: return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 @validate_call - def login_user_with_http_info(self, username : Annotated[StrictStr, Field(description="The user name for login")], password : Annotated[StrictStr, Field(description="The password for login in clear text")], **kwargs) -> ApiResponse: # noqa: E501 + def login_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="The user name for login")], + password: Annotated[StrictStr, Field(description="The password for login in clear text")], + **kwargs, + ) -> ApiResponse: """Logs user into the system # noqa: E501 # noqa: E501 @@ -911,7 +961,10 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def logout_user(self, **kwargs) -> None: # noqa: E501 + def logout_user( + self, + **kwargs, + ) -> None: """Logs out current logged in user session # noqa: E501 # noqa: E501 @@ -939,7 +992,10 @@ class UserApi: return self.logout_user_with_http_info(**kwargs) # noqa: E501 @validate_call - def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + def logout_user_with_http_info( + self, + **kwargs, + ) -> ApiResponse: """Logs out current logged in user session # noqa: E501 # noqa: E501 @@ -1037,7 +1093,12 @@ class UserApi: _request_auth=_params.get('_request_auth')) @validate_call - def update_user(self, username : Annotated[StrictStr, Field(description="name that need to be deleted")], user : Annotated[User, Field(description="Updated user object")], **kwargs) -> None: # noqa: E501 + def update_user( + self, + username: Annotated[StrictStr, Field(description="name that need to be deleted")], + user: Annotated[User, Field(description="Updated user object")], + **kwargs, + ) -> None: """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -1069,7 +1130,12 @@ class UserApi: return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 @validate_call - def update_user_with_http_info(self, username : Annotated[StrictStr, Field(description="name that need to be deleted")], user : Annotated[User, Field(description="Updated user object")], **kwargs) -> ApiResponse: # noqa: E501 + def update_user_with_http_info( + self, + username: Annotated[StrictStr, Field(description="name that need to be deleted")], + user: Annotated[User, Field(description="Updated user object")], + **kwargs, + ) -> ApiResponse: """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501