From ef8e55ca21d71dd1e68c47ea239974c75b96a4f8 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 10 Oct 2022 20:13:31 -0700 Subject: [PATCH] [python] client bug fixes + type hint improvements (#13665) * Adds python client, template, and spec updates for query param content type json * Samples regenerated * Finishes adding test cases for query param json content type * Uses newest templates * Templates replaced, spec replaces, sample replaced * Samples updated --- .../codegen/CodegenOperation.java | 21 ++ .../languages/PythonClientCodegen.java | 3 +- .../resources/python/api_client.handlebars | 78 ++--- .../main/resources/python/endpoint.handlebars | 216 +++++-------- .../resources/python/endpoint_args.handlebars | 139 +++++++-- .../endpoint_args_baseapi_wrapper.handlebars | 5 + ...ndpoint_args_httpmethod_wrapper.handlebars | 5 + ...dpoint_args_operationid_wrapper.handlebars | 5 + .../python/endpoint_parameter.handlebars | 11 +- ...dpoint_parameter_schema_and_def.handlebars | 56 ++++ .../python/required_libraries.handlebars | 16 + .../resources/python/requirements.handlebars | 6 +- .../main/resources/python/setup.handlebars | 16 +- ...odels-for-testing-with-http-signature.yaml | 36 ++- .../3_0_3_unit_test/python/requirements.txt | 9 +- .../client/3_0_3_unit_test/python/setup.py | 11 +- .../python/unit_test_api/api_client.py | 78 ++--- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../post.py | 113 ++++++- .../post.pyi | 113 ++++++- .../python/dynamic_servers/api_client.py | 78 ++--- .../dynamic_servers/paths/custom/get.py | 122 +++++++- .../dynamic_servers/paths/custom/get.pyi | 122 +++++++- .../dynamic_servers/paths/default/get.py | 113 ++++++- .../dynamic_servers/paths/default/get.pyi | 113 ++++++- .../dynamic-servers/python/requirements.txt | 9 +- .../features/dynamic-servers/python/setup.py | 11 +- .../openapi3/client/petstore/python/README.md | 1 + .../petstore/python/docs/apis/tags/FakeApi.md | 94 +++++- .../petstore/python/docs/apis/tags/UserApi.md | 4 +- .../python/petstore_api/api_client.py | 78 ++--- .../python/petstore_api/apis/path_to_api.py | 3 + ...fake_query_param_with_json_content_type.py | 7 + .../python/petstore_api/apis/tags/fake_api.py | 2 + .../python/petstore_api/paths/__init__.py | 1 + .../paths/another_fake_dummy/patch.py | 182 +++++++++-- .../paths/another_fake_dummy/patch.pyi | 182 +++++++++-- .../python/petstore_api/paths/fake/delete.py | 131 ++++++-- .../python/petstore_api/paths/fake/delete.pyi | 129 ++++++-- .../python/petstore_api/paths/fake/get.py | 199 ++++++++++-- .../python/petstore_api/paths/fake/get.pyi | 197 ++++++++++-- .../python/petstore_api/paths/fake/patch.py | 182 +++++++++-- .../python/petstore_api/paths/fake/patch.pyi | 182 +++++++++-- .../python/petstore_api/paths/fake/post.py | 171 +++++++++-- .../python/petstore_api/paths/fake/post.pyi | 169 ++++++++++- .../get.py | 178 ++++++++++- .../get.pyi | 178 ++++++++++- .../paths/fake_body_with_file_schema/put.py | 170 +++++++++-- .../paths/fake_body_with_file_schema/put.pyi | 170 +++++++++-- .../paths/fake_body_with_query_params/put.py | 186 ++++++++++-- .../paths/fake_body_with_query_params/put.pyi | 186 ++++++++++-- .../paths/fake_case_sensitive_params/put.py | 115 ++++++- .../paths/fake_case_sensitive_params/put.pyi | 115 ++++++- .../paths/fake_classname_test/patch.py | 182 +++++++++-- .../paths/fake_classname_test/patch.pyi | 182 +++++++++-- .../paths/fake_delete_coffee_id/delete.py | 124 ++++++-- .../paths/fake_delete_coffee_id/delete.pyi | 124 ++++++-- .../petstore_api/paths/fake_health/get.py | 113 ++++++- .../petstore_api/paths/fake_health/get.pyi | 113 ++++++- .../fake_inline_additional_properties/post.py | 170 +++++++++-- .../post.pyi | 170 +++++++++-- .../paths/fake_inline_composition_/post.py | 234 ++++++++++++-- .../paths/fake_inline_composition_/post.pyi | 234 ++++++++++++-- .../paths/fake_json_form_data/get.py | 166 +++++++++- .../paths/fake_json_form_data/get.pyi | 166 +++++++++- .../paths/fake_json_patch/patch.py | 166 +++++++++- .../paths/fake_json_patch/patch.pyi | 166 +++++++++- .../paths/fake_json_with_charset/post.py | 178 ++++++++++- .../paths/fake_json_with_charset/post.pyi | 178 ++++++++++- .../paths/fake_obj_in_query/get.py | 115 ++++++- .../paths/fake_obj_in_query/get.pyi | 115 ++++++- .../post.py | 234 ++++++++++++-- .../post.pyi | 234 ++++++++++++-- .../post.py | 192 ++++++++++-- .../post.pyi | 192 ++++++++++-- .../__init__.py | 7 + .../get.py | 285 ++++++++++++++++++ .../get.pyi | 280 +++++++++++++++++ .../paths/fake_ref_obj_in_query/get.py | 115 ++++++- .../paths/fake_ref_obj_in_query/get.pyi | 115 ++++++- .../paths/fake_refs_array_of_enums/post.py | 178 ++++++++++- .../paths/fake_refs_array_of_enums/post.pyi | 178 ++++++++++- .../paths/fake_refs_arraymodel/post.py | 178 ++++++++++- .../paths/fake_refs_arraymodel/post.pyi | 178 ++++++++++- .../paths/fake_refs_boolean/post.py | 178 ++++++++++- .../paths/fake_refs_boolean/post.pyi | 178 ++++++++++- .../post.py | 178 ++++++++++- .../post.pyi | 178 ++++++++++- .../petstore_api/paths/fake_refs_enum/post.py | 178 ++++++++++- .../paths/fake_refs_enum/post.pyi | 178 ++++++++++- .../paths/fake_refs_mammal/post.py | 182 +++++++++-- .../paths/fake_refs_mammal/post.pyi | 182 +++++++++-- .../paths/fake_refs_number/post.py | 178 ++++++++++- .../paths/fake_refs_number/post.pyi | 178 ++++++++++- .../post.py | 178 ++++++++++- .../post.pyi | 178 ++++++++++- .../paths/fake_refs_string/post.py | 178 ++++++++++- .../paths/fake_refs_string/post.pyi | 178 ++++++++++- .../paths/fake_response_without_schema/get.py | 113 ++++++- .../fake_response_without_schema/get.pyi | 113 ++++++- .../paths/fake_test_query_paramters/put.py | 115 ++++++- .../paths/fake_test_query_paramters/put.pyi | 115 ++++++- .../paths/fake_upload_download_file/post.py | 182 +++++++++-- .../paths/fake_upload_download_file/post.pyi | 182 +++++++++-- .../paths/fake_upload_file/post.py | 178 ++++++++++- .../paths/fake_upload_file/post.pyi | 178 ++++++++++- .../paths/fake_upload_files/post.py | 178 ++++++++++- .../paths/fake_upload_files/post.pyi | 178 ++++++++++- .../python/petstore_api/paths/foo/get.py | 113 ++++++- .../python/petstore_api/paths/foo/get.pyi | 113 ++++++- .../python/petstore_api/paths/pet/post.py | 221 ++++++++++++-- .../python/petstore_api/paths/pet/post.pyi | 221 ++++++++++++-- .../python/petstore_api/paths/pet/put.py | 188 +++++++++++- .../python/petstore_api/paths/pet/put.pyi | 188 +++++++++++- .../paths/pet_find_by_status/get.py | 124 +++++++- .../paths/pet_find_by_status/get.pyi | 124 +++++++- .../paths/pet_find_by_tags/get.py | 124 +++++++- .../paths/pet_find_by_tags/get.pyi | 124 +++++++- .../petstore_api/paths/pet_pet_id/delete.py | 111 ++++++- .../petstore_api/paths/pet_pet_id/delete.pyi | 111 ++++++- .../petstore_api/paths/pet_pet_id/get.py | 124 +++++++- .../petstore_api/paths/pet_pet_id/get.pyi | 124 +++++++- .../petstore_api/paths/pet_pet_id/post.py | 156 +++++++++- .../petstore_api/paths/pet_pet_id/post.pyi | 156 +++++++++- .../paths/pet_pet_id_upload_image/post.py | 192 ++++++++++-- .../paths/pet_pet_id_upload_image/post.pyi | 192 ++++++++++-- .../petstore_api/paths/store_inventory/get.py | 113 ++++++- .../paths/store_inventory/get.pyi | 113 ++++++- .../petstore_api/paths/store_order/post.py | 182 +++++++++-- .../petstore_api/paths/store_order/post.pyi | 182 +++++++++-- .../paths/store_order_order_id/delete.py | 100 +++++- .../paths/store_order_order_id/delete.pyi | 100 +++++- .../paths/store_order_order_id/get.py | 124 +++++++- .../paths/store_order_order_id/get.pyi | 124 +++++++- .../python/petstore_api/paths/user/post.py | 170 +++++++++-- .../python/petstore_api/paths/user/post.pyi | 170 +++++++++-- .../paths/user_create_with_array/post.py | 170 +++++++++-- .../paths/user_create_with_array/post.pyi | 170 +++++++++-- .../paths/user_create_with_list/post.py | 170 +++++++++-- .../paths/user_create_with_list/post.pyi | 170 +++++++++-- .../petstore_api/paths/user_login/get.py | 124 +++++++- .../petstore_api/paths/user_login/get.pyi | 124 +++++++- .../petstore_api/paths/user_logout/get.py | 104 ++++++- .../petstore_api/paths/user_logout/get.pyi | 104 ++++++- .../paths/user_username/delete.py | 120 ++++++-- .../paths/user_username/delete.pyi | 118 +++++++- .../petstore_api/paths/user_username/get.py | 124 +++++++- .../petstore_api/paths/user_username/get.pyi | 124 +++++++- .../petstore_api/paths/user_username/put.py | 162 ++++++++-- .../petstore_api/paths/user_username/put.pyi | 162 ++++++++-- .../client/petstore/python/requirements.txt | 11 +- .../openapi3/client/petstore/python/setup.py | 15 +- .../test/test_paths/test_fake/test_delete.py | 2 +- .../test/test_paths/test_fake/test_get.py | 2 +- .../test/test_paths/test_fake/test_post.py | 2 +- .../__init__.py | 0 .../test_get.py | 41 +++ .../test_user_username/test_delete.py | 2 +- .../petstore/python/tests_manual/__init__.py | 3 + .../python/tests_manual/test_fake_api.py | 2 +- .../python/tests_manual/test_parameters.py | 64 +++- .../test_paths/test_fake/__init__.py | 0 .../test_paths/test_fake/test_get.py | 73 +++++ .../__init__.py | 0 .../test_get.py | 106 +++++++ .../test_paths/test_pet_pet_id/test_get.py | 12 +- 511 files changed, 61345 insertions(+), 8047 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/python/endpoint_args_baseapi_wrapper.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python/endpoint_args_httpmethod_wrapper.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python/endpoint_args_operationid_wrapper.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python/required_libraries.handlebars create mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi create mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py create mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 7051777e5c..2672a1709a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -193,6 +193,27 @@ public class CodegenOperation { return responses.stream().anyMatch(response -> response.isDefault); } + public boolean getAllResponsesAreErrors() { + return responses.stream().allMatch(response -> response.is4xx || response.is5xx); + } + + /** + * @return contentTypeToOperation + * returns a map where the key is the request body content type and the value is the current CodegenOperation + * this is needed by templates when a different signature is needed for each request body content type + */ + public Map getContentTypeToOperation() { + LinkedHashMap contentTypeToOperation = new LinkedHashMap<>(); + if (bodyParam == null) { + return null; + } + LinkedHashMap content = bodyParam.getContent(); + for (String contentType: content.keySet()) { + contentTypeToOperation.put(contentType, this); + } + return contentTypeToOperation; + } + /** * Check if there's at least one vendor extension * diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 8dcd19c2eb..5100b00017 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -997,12 +997,13 @@ public class PythonClientCodegen extends AbstractPythonCodegen { } } // clone this so we can change some properties on it - CodegenProperty schemaProp = cp.getSchema().clone(); + CodegenProperty schemaProp = cp.getSchema(); // parameters may have valid python names like some_val or invalid ones like Content-Type // we always set nameInSnakeCase to null so special handling will not be done for these names // invalid python names will be handled in python by using a TypedDict which will allow us to have a type hint // for keys that cannot be variable names to the schema baseName if (schemaProp != null) { + schemaProp = schemaProp.clone(); schemaProp.nameInSnakeCase = null; schemaProp.baseName = toModelName(cp.baseName) + "Schema"; cp.setSchema(schemaProp); diff --git a/modules/openapi-generator/src/main/resources/python/api_client.handlebars b/modules/openapi-generator/src/main/resources/python/api_client.handlebars index 1bf13aaa30..bdcd4519ff 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.handlebars +++ b/modules/openapi-generator/src/main/resources/python/api_client.handlebars @@ -49,6 +49,8 @@ class RequestField(RequestFieldBase): class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + def default(self, obj): if isinstance(obj, str): return str(obj) @@ -320,8 +322,25 @@ class StyleSimpleSerializer(ParameterSerializerBase): ) +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + @dataclass -class ParameterBase: +class ParameterBase(JSONDetector): name: str in_type: ParameterInType required: bool @@ -348,7 +367,6 @@ class ParameterBase: } __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() - _json_content_type = 'application/json' @classmethod def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): @@ -395,8 +413,11 @@ class ParameterBase: def _serialize_json( self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) return json.dumps(in_data) @@ -491,7 +512,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -509,7 +530,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode super().__init__( @@ -572,8 +593,6 @@ class QueryParameter(ParameterBase, StyleFormSerializer): return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if not self.schema: - return None if self.style is ParameterStyle.FORM: return PrefixSeparatorIterator('?', '&') elif self.style is ParameterStyle.SPACE_DELIMITED: @@ -612,12 +631,17 @@ class QueryParameter(ParameterBase, StyleFormSerializer): elif self.style is ParameterStyle.PIPE_DELIMITED: return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -676,7 +700,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -733,7 +757,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -796,23 +820,6 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - class OpenApiResponse(JSONDetector): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') @@ -987,7 +994,7 @@ class ApiClient: self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} + self.default_headers = HTTPHeaderDict() if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1047,15 +1054,18 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or HTTPHeaderDict() - headers.update(self.default_headers) + used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(headers, + self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) + # request url if host is None: url = self.configuration.host + resource_path @@ -1067,7 +1077,7 @@ class ApiClient: response = {{#if asyncio}}await {{/if}}{{#if tornado}}yield {{/if}}self.request( method, url, - headers=headers, + headers=used_headers, fields=fields, body=body, stream=stream, diff --git a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars index 71eb358b57..8190bd78e3 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars @@ -21,156 +21,16 @@ from . import path {{/unless}} {{#with operation}} {{#if queryParams}} -# query params -{{#each queryParams}} -{{#with schema}} -{{> model_templates/schema }} -{{/with}} -{{/each}} -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { -{{#each queryParams}} -{{#if required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/if}} -{{/each}} - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { -{{#each queryParams}} -{{#unless required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/unless}} -{{/each}} - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -{{#each queryParams}} -{{> endpoint_parameter }} -{{/each}} +{{> endpoint_parameter_schema_and_def xParams=queryParams xParamsName="Query" }} {{/if}} {{#if headerParams}} -# header params -{{#each headerParams}} -{{#with schema}} -{{> model_templates/schema }} -{{/with}} -{{/each}} -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { -{{#each headerParams}} -{{#if required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/if}} -{{/each}} - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { -{{#each headerParams}} -{{#unless required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/unless}} -{{/each}} - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -{{#each headerParams}} -{{> endpoint_parameter }} -{{/each}} +{{> endpoint_parameter_schema_and_def xParams=headerParams xParamsName="Header" }} {{/if}} {{#if pathParams}} -# path params -{{#each pathParams}} -{{#with schema}} -{{> model_templates/schema }} -{{/with}} -{{/each}} -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { -{{#each pathParams}} -{{#if required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/if}} -{{/each}} - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { -{{#each pathParams}} -{{#unless required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/unless}} -{{/each}} - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -{{#each pathParams}} -{{> endpoint_parameter }} -{{/each}} +{{> endpoint_parameter_schema_and_def xParams=pathParams xParamsName="Path" }} {{/if}} {{#if cookieParams}} -# cookie params -{{#each cookieParams}} -{{#with schema}} -{{> model_templates/schema }} -{{/with}} -{{/each}} -RequestRequiredCookieParams = typing_extensions.TypedDict( - 'RequestRequiredCookieParams', - { -{{#each cookieParams}} -{{#if required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/if}} -{{/each}} - } -) -RequestOptionalCookieParams = typing_extensions.TypedDict( - 'RequestOptionalCookieParams', - { -{{#each cookieParams}} -{{#unless required}} - '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} -{{/unless}} -{{/each}} - }, - total=False -) - - -class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): - pass - - -{{#each cookieParams}} -{{> endpoint_parameter }} -{{/each}} +{{> endpoint_parameter_schema_and_def xParams=cookieParams xParamsName="Cookie" }} {{/if}} {{#with bodyParam}} # body param @@ -373,9 +233,29 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): +{{#if bodyParam}} + {{#each getContentTypeToOperation}} + {{> endpoint_args_baseapi_wrapper contentType=@key this=this}} + + {{/each}} + {{> endpoint_args_baseapi_wrapper contentType="null" this=this}} + +{{else}} + @typing.overload + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=true skipDeserialization="False" contentType="null"}} +{{/if}} + + @typing.overload + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=true skipDeserialization="True" contentType="null"}} + + @typing.overload + def _{{operationId}}_oapg( + {{> endpoint_args isOverload=true skipDeserialization="null" contentType="null"}} def _{{operationId}}_oapg( - {{> endpoint_args selfType="api_client.Api" }} + {{> endpoint_args isOverload=false skipDeserialization="null" contentType="null"}} """ {{#if summary}} {{summary}} @@ -521,8 +401,29 @@ class BaseApi(api_client.Api): class {{operationIdCamelCase}}(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names +{{#if bodyParam}} + {{#each getContentTypeToOperation}} + {{> endpoint_args_operationid_wrapper contentType=@key this=this}} + + {{/each}} + {{> endpoint_args_operationid_wrapper contentType="null" this=this}} + +{{else}} + @typing.overload def {{operationId}}( - {{> endpoint_args selfType="BaseApi" }} + {{> endpoint_args isOverload=true skipDeserialization="False" contentType="null"}} +{{/if}} + + @typing.overload + def {{operationId}}( + {{> endpoint_args isOverload=true skipDeserialization="True" contentType="null"}} + + @typing.overload + def {{operationId}}( + {{> endpoint_args isOverload=true skipDeserialization="null" contentType="null"}} + + def {{operationId}}( + {{> endpoint_args isOverload=false skipDeserialization="null" contentType="null"}} return self._{{operationId}}_oapg( {{> endpoint_args_passed }} ) @@ -531,8 +432,29 @@ class {{operationIdCamelCase}}(BaseApi): class ApiFor{{httpMethod}}(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names +{{#if bodyParam}} + {{#each getContentTypeToOperation}} + {{> endpoint_args_httpmethod_wrapper contentType=@key this=this}} + + {{/each}} + {{> endpoint_args_httpmethod_wrapper contentType="null" this=this}} + +{{else}} + @typing.overload def {{httpMethod}}( - {{> endpoint_args selfType="BaseApi" }} + {{> endpoint_args isOverload=true skipDeserialization="False" contentType="null"}} +{{/if}} + + @typing.overload + def {{httpMethod}}( + {{> endpoint_args isOverload=true skipDeserialization="True" contentType="null"}} + + @typing.overload + def {{httpMethod}}( + {{> endpoint_args isOverload=true skipDeserialization="null" contentType="null"}} + + def {{httpMethod}}( + {{> endpoint_args isOverload=false skipDeserialization="null" contentType="null"}} return self._{{operationId}}_oapg( {{> endpoint_args_passed }} ) diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_args.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_args.handlebars index 01aa9ddbce..bff216a72f 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint_args.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint_args.handlebars @@ -1,8 +1,78 @@ - self: {{selfType}}, + self, {{#if bodyParam}} -{{#with bodyParam}} - body: typing.Union[{{#each content}}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}{{#unless required}}schemas.Unset] = schemas.unset{{else}}]{{/unless}}, -{{/with}} + {{#if bodyParam.required}} + {{#with bodyParam}} + {{#eq ../contentType "null"}} + body: typing.Union[{{#each getContent}}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/each}}], + {{else}} + body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}{{baseName}},{{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}], + {{/eq}} + {{/with}} + {{#if isOverload}} + {{#eq skipDeserialization "True"}} + skip_deserialization: typing_extensions.Literal[True], + {{/eq}} + {{#neq contentType "null"}} + {{#with bodyParam}} + {{#each content}} + {{#eq @key ../../contentType}} + {{#if @first}} + content_type: typing_extensions.Literal["{{{@key}}}"] = ..., + {{else}} + content_type: typing_extensions.Literal["{{{@key}}}"], + {{/if}} + {{/eq}} + {{/each}} + {{/with}} + {{else}} + content_type: str = ..., + {{/neq}} + {{else}} + {{#with bodyParam}} + {{#each getContent}} + {{#if @first}} + content_type: str = '{{{@key}}}', + {{/if}} + {{/each}} + {{/with}} + {{/if}} + {{else}} + {{#if isOverload}} + {{#eq skipDeserialization "True"}} + skip_deserialization: typing_extensions.Literal[True], + {{/eq}} + {{#neq contentType "null"}} + {{#with bodyParam}} + {{#each getContent}} + {{#eq @key ../../contentType}} + {{#if @first}} + content_type: typing_extensions.Literal["{{{@key}}}"] = ..., + {{else}} + content_type: typing_extensions.Literal["{{{@key}}}"], + {{/if}} + {{/eq}} + {{/each}} + {{/with}} + {{else}} + content_type: str = ..., + {{/neq}} + {{else}} + {{#with bodyParam}} + {{#each getContent}} + {{#if @first}} + content_type: str = '{{{@key}}}', + {{/if}} + {{/each}} + {{/with}} + {{/if}} + {{#with bodyParam}} + {{#eq ../contentType "null"}} + body: typing.Union[{{#each getContent}}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/each}}schemas.Unset] = schemas.unset, + {{else}} + body: typing.Union[{{#each getContent}}{{#eq @key ../../contentType }}{{#with this.schema}}{{baseName}}, {{> model_templates/schema_python_types }}{{/with}}{{/eq}}{{/each}}schemas.Unset] = schemas.unset, + {{/eq}} + {{/with}} + {{/if}} {{/if}} {{#if queryParams}} query_params: RequestQueryParams = frozendict.frozendict(), @@ -16,13 +86,6 @@ {{#if cookieParams}} cookie_params: RequestCookieParams = frozendict.frozendict(), {{/if}} -{{#with bodyParam}} -{{#each content}} -{{#if @first}} - content_type: str = '{{{@key}}}', -{{/if}} -{{/each}} -{{/with}} {{#if produces}} accept_content_types: typing.Tuple[str] = _all_accept_content_types, {{/if}} @@ -31,16 +94,48 @@ {{/if}} stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, -) -> typing.Union[ -{{#each responses}} - {{#if isDefault}} - ApiResponseForDefault, + {{#if isOverload}} + {{#eq skipDeserialization "False"}} + skip_deserialization: typing_extensions.Literal[False] = ..., + {{/eq}} + {{#eq skipDeserialization "null"}} + skip_deserialization: bool = ..., + {{/eq}} {{else}} - {{#if is2xx}} - ApiResponseFor{{code}}, - {{/if}} + skip_deserialization: bool = False, {{/if}} -{{/each}} - api_client.ApiResponseWithoutDeserialization -]: +{{#eq skipDeserialization "True"}} +) -> api_client.ApiResponseWithoutDeserialization: ... +{{/eq}} +{{#eq skipDeserialization "False"}} +) -> {{#if getAllResponsesAreErrors}}api_client.ApiResponseWithoutDeserialization: ...{{else}}typing.Union[ + {{#each responses}} + {{#if isDefault}} + ApiResponseForDefault, + {{else}} + {{#if is2xx}} + ApiResponseFor{{code}}, + {{/if}} + {{/if}} + {{/each}} +]: ... + {{/if}} +{{/eq}} +{{#eq skipDeserialization "null"}} +{{#if isOverload}} +) -> typing.Union[ + {{#each responses}} + {{#if isDefault}} + ApiResponseForDefault, + {{else}} + {{#if is2xx}} + ApiResponseFor{{code}}, + {{/if}} + {{/if}} + {{/each}} + api_client.ApiResponseWithoutDeserialization, +]: ... +{{else}} +): +{{/if}} +{{/eq}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_args_baseapi_wrapper.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_args_baseapi_wrapper.handlebars new file mode 100644 index 0000000000..cd73d02e9c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/endpoint_args_baseapi_wrapper.handlebars @@ -0,0 +1,5 @@ +@typing.overload +{{#with this}} +def _{{operationId}}_oapg( +{{> endpoint_args isOverload=true skipDeserialization="False" contentType=contentType}} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_args_httpmethod_wrapper.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_args_httpmethod_wrapper.handlebars new file mode 100644 index 0000000000..f28bd735a5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/endpoint_args_httpmethod_wrapper.handlebars @@ -0,0 +1,5 @@ +@typing.overload +{{#with this}} +def {{httpMethod}}( +{{> endpoint_args isOverload=true skipDeserialization="False" contentType=contentType}} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_args_operationid_wrapper.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_args_operationid_wrapper.handlebars new file mode 100644 index 0000000000..47b5ea64ca --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/endpoint_args_operationid_wrapper.handlebars @@ -0,0 +1,5 @@ +@typing.overload +{{#with this}} +def {{operationId}}( +{{> endpoint_args isOverload=true skipDeserialization="False" contentType=contentType}} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_parameter.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_parameter.handlebars index 4b9d815af8..8c18c997e3 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint_parameter.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint_parameter.handlebars @@ -4,9 +4,16 @@ request_{{#if isQueryParam}}query{{/if}}{{#if isPathParam}}path{{/if}}{{#if isHe style=api_client.ParameterStyle.{{style}}, {{/if}} {{#if schema}} -{{#with schema}} + {{#with schema}} schema={{baseName}}, -{{/with}} + {{/with}} +{{/if}} +{{#if getContent}} + content={ +{{#each getContent}} + "{{@key}}": {{#with this}}{{#with schema}}{{baseName}}{{/with}}{{/with}}, +{{/each}} + }, {{/if}} {{#if required}} required=True, diff --git a/modules/openapi-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars new file mode 100644 index 0000000000..313a64dc20 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/endpoint_parameter_schema_and_def.handlebars @@ -0,0 +1,56 @@ +# {{xParamsName}} params +{{#each xParams}} + {{#if schema}} + {{#with schema}} +{{> model_templates/schema }} + {{/with}} + {{else}} + {{#if getContent}} + {{#each getContent}} + {{#with this}} + {{#with schema}} +{{> model_templates/schema }} + {{/with}} + {{/with}} + {{/each}} + {{/if}} + {{/if}} +{{/each}} +RequestRequired{{xParamsName}}Params = typing_extensions.TypedDict( + 'RequestRequired{{xParamsName}}Params', + { +{{#each xParams}} +{{#if required}} +{{#if schema}} + '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} +{{else}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} +{{/if}} +{{/if}} +{{/each}} + } +) +RequestOptional{{xParamsName}}Params = typing_extensions.TypedDict( + 'RequestOptional{{xParamsName}}Params', + { +{{#each xParams}} +{{#unless required}} +{{#if schema}} + '{{baseName}}': {{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}} +{{else}} + '{{baseName}}': {{#each getContent}}{{#with this}}{{#with schema}}typing.Union[{{baseName}}, {{> model_templates/schema_python_types }}],{{/with}}{{/with}}{{/each}} +{{/if}} +{{/unless}} +{{/each}} + }, + total=False +) + + +class Request{{xParamsName}}Params(RequestRequired{{xParamsName}}Params, RequestOptional{{xParamsName}}Params): + pass + + +{{#each xParams}} +{{> endpoint_parameter }} +{{/each}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/required_libraries.handlebars b/modules/openapi-generator/src/main/resources/python/required_libraries.handlebars new file mode 100644 index 0000000000..f8395307a8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/required_libraries.handlebars @@ -0,0 +1,16 @@ +{{#if asyncio}} +{{#if quoted}}"{{/if}}aiohttp >= 3.0.0{{#if quoted}}",{{/if}} +{{/if}} +{{#if quoted}}"{{/if}}certifi >= 14.5.14{{#if quoted}}",{{/if}} +{{#if quoted}}"{{/if}}frozendict ~= 2.3.4{{#if quoted}}",{{/if}} +{{#if hasHttpSignatureMethods}} +{{#if quoted}}"{{/if}}pem >= 19.3.0{{#if quoted}}",{{/if}} +{{#if quoted}}"{{/if}}pycryptodome >= 3.9.0{{#if quoted}}",{{/if}} +{{/if}} +{{#if quoted}}"{{/if}}python-dateutil ~= 2.7.0{{#if quoted}}",{{/if}} +{{#if quoted}}"{{/if}}setuptools >= 21.0.0{{#if quoted}}",{{/if}} +{{#if tornado}} +{{#if quoted}}"{{/if}}tornado >= 4.2{{#if quoted}}",{{/if}} +{{/if}} +{{#if quoted}}"{{/if}}typing_extensions ~= 4.3.0{{#if quoted}}",{{/if}} +{{#if quoted}}"{{/if}}urllib3 ~= 1.26.7{{#if quoted}}",{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python/requirements.handlebars b/modules/openapi-generator/src/main/resources/python/requirements.handlebars index c9227e58a1..b1f24de150 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.handlebars +++ b/modules/openapi-generator/src/main/resources/python/requirements.handlebars @@ -1,5 +1 @@ -certifi >= 14.05.14 -frozendict >= 2.0.3 -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.15.1 +{{> required_libraries quoted=false }} diff --git a/modules/openapi-generator/src/main/resources/python/setup.handlebars b/modules/openapi-generator/src/main/resources/python/setup.handlebars index a346b23cb6..5cb64ff1e6 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.handlebars +++ b/modules/openapi-generator/src/main/resources/python/setup.handlebars @@ -15,21 +15,7 @@ VERSION = "{{packageVersion}}" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.15", - "certifi", - "python-dateutil", - "frozendict >= 2.0.3", -{{#if asyncio}} - "aiohttp >= 3.0.0", -{{/if}} -{{#if tornado}} - "tornado>=4.2,<5", -{{/if}} -{{#if hasHttpSignatureMethods}} - "pem>=19.3.0", - "pycryptodome>=3.9.0", -{{/if}} - "typing_extensions", + {{> required_libraries quoted=true }} ] setup( diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 1259cf4310..deef554542 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -545,8 +545,8 @@ paths: schema: type: string responses: - '400': - description: Invalid username supplied + '200': + description: Success '404': description: User not found /fake_classname_test: @@ -651,8 +651,8 @@ paths: - 1.1 - -1.2 responses: - '400': - description: Invalid request + '200': + description: Success '404': description: Not found requestBody: @@ -693,8 +693,8 @@ paths: 가짜 엔드 포인트 operationId: EndpointParameters responses: - '400': - description: Invalid username supplied + '200': + description: Success '404': description: User not found security: @@ -822,8 +822,8 @@ paths: type: integer format: int64 responses: - '400': - description: Someting wrong + '200': + description: succeeded /fake/refs/number: post: tags: @@ -1592,6 +1592,26 @@ paths: description: OK default: description: Unexpected error + /fake/queryParamWithJsonContentType: + get: + operationId: queryParamWithJsonContentType + summary: query param with json content-type + tags: + - fake + parameters: + - name: someParam + in: query + description: The internal object id + required: true + content: + application/json: + schema: {} + responses: + 200: + description: success + content: + application/json: + schema: {} servers: - url: 'http://{server}.swagger.io:{port}/v2' description: petstore server diff --git a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt index c9227e58a1..3cb6612669 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt +++ b/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt @@ -1,5 +1,6 @@ -certifi >= 14.05.14 -frozendict >= 2.0.3 -python_dateutil >= 2.5.3 +certifi >= 14.5.14 +frozendict ~= 2.3.4 +python-dateutil ~= 2.7.0 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +typing_extensions ~= 4.3.0 +urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/setup.py b/samples/openapi3/client/3_0_3_unit_test/python/setup.py index 5f2ac30e9f..1fc837120c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/setup.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/setup.py @@ -21,11 +21,12 @@ VERSION = "1.0.0" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.15", - "certifi", - "python-dateutil", - "frozendict >= 2.0.3", - "typing_extensions", + "certifi >= 14.5.14", + "frozendict ~= 2.3.4", + "python-dateutil ~= 2.7.0", + "setuptools >= 21.0.0", + "typing_extensions ~= 4.3.0", + "urllib3 ~= 1.26.7", ] setup( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py index 9cae045704..dfbf6822aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py @@ -53,6 +53,8 @@ class RequestField(RequestFieldBase): class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + def default(self, obj): if isinstance(obj, str): return str(obj) @@ -324,8 +326,25 @@ class StyleSimpleSerializer(ParameterSerializerBase): ) +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + @dataclass -class ParameterBase: +class ParameterBase(JSONDetector): name: str in_type: ParameterInType required: bool @@ -352,7 +371,6 @@ class ParameterBase: } __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() - _json_content_type = 'application/json' @classmethod def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): @@ -399,8 +417,11 @@ class ParameterBase: def _serialize_json( self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) return json.dumps(in_data) @@ -495,7 +516,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -513,7 +534,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode super().__init__( @@ -576,8 +597,6 @@ class QueryParameter(ParameterBase, StyleFormSerializer): return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if not self.schema: - return None if self.style is ParameterStyle.FORM: return PrefixSeparatorIterator('?', '&') elif self.style is ParameterStyle.SPACE_DELIMITED: @@ -616,12 +635,17 @@ class QueryParameter(ParameterBase, StyleFormSerializer): elif self.style is ParameterStyle.PIPE_DELIMITED: return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -680,7 +704,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -737,7 +761,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -800,23 +824,6 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - class OpenApiResponse(JSONDetector): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') @@ -991,7 +998,7 @@ class ApiClient: self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} + self.default_headers = HTTPHeaderDict() if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1048,15 +1055,18 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or HTTPHeaderDict() - headers.update(self.default_headers) + used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(headers, + self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) + # request url if host is None: url = self.configuration.host + resource_path @@ -1068,7 +1078,7 @@ class ApiClient: response = self.request( method, url, - headers=headers, + headers=used_headers, fields=fields, body=body, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py index 9d181743b1..51f747166d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi index 1370c0c573..fb323cc1c8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py index 6b6aad1b77..7be02743e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi index b36b08ea74..8155ff2963 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_are_allowed_by_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py index b5f0df3456..f561016356 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi index 06ee604bb4..6ba0464fbd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_can_exist_by_itself_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py index b13a4db5f8..0e3ae3974b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi index c266c8997e..fea43428f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_should_not_look_in_applicators_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py index ed580b82ab..053e2d964a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_combined_with_anyof_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi index 973d5fb182..e62508b3e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_combined_with_anyof_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py index 4eb46ceb57..89a3a94019 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi index ee27dfce27..4deddd781e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py index 4e2ae80d04..5bc90d06c4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_simple_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_simple_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofSimpleTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi index 4a4e727448..f334d8eeb4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_simple_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_simple_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_simple_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_simple_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofSimpleTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py index 93d1a9272c..0af6bbed3e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi index 0feecdc272..b973fab5af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py index 82f3d20965..0598041551 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi index 386d9c5596..19358a62ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py index f20c2387cf..3d2e11c346 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_first_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_first_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi index 6c068a889f..9094994b1f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_first_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_first_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py index 20eb1788e2..427873e471 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_last_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_last_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi index 8ca26c1a3b..fa64bb7f00 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_last_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_last_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py index 5f554b1a1d..c47e5a9411 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_two_empty_schemas_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_two_empty_schemas_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi index 5521fdb15a..3f4116de0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_two_empty_schemas_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_two_empty_schemas_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py index 0352c3702f..bc529f7e11 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAnyofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi index 50096bedca..8b1ea8f8ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAnyofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py index e3cdd801ce..8e99ee7a3c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi index 6600c36c2c..69a0a26d93 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py index 6291b17d5d..217369cd91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi index 3eb77b7710..bc85fc6cd1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAnyofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py index 7a0c2e75cb..f08f875b41 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi index 2e14ab6e08..fdd3f85a03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_one_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_one_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py index 0ea29561b9..7511003b1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_array_type_matches_arrays_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_array_type_matches_arrays_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostArrayTypeMatchesArraysRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi index 77a876fdd1..672a3a3a6a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_array_type_matches_arrays_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_array_type_matches_arrays_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_array_type_matches_arrays_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostArrayTypeMatchesArraysRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py index 169b8b2a45..db22058d0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_boolean_type_matches_booleans_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_boolean_type_matches_booleans_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi index 7311cae45c..b30d7be40c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_boolean_type_matches_booleans_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_boolean_type_matches_booleans_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_boolean_type_matches_booleans_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py index d85026f9e8..5d69029a34 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_int_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostByIntRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_int_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostByIntRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi index aa9da9d017..599b4979b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_int_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_int_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostByIntRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_int_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_int_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostByIntRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py index 94ae9d6b9d..8e84300e73 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostByNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostByNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi index 3347fd7cd7..2965ae1919 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostByNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostByNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py index 0910a13fa3..668ee59186 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_small_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostBySmallNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_small_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostBySmallNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi index f252fac791..adc387a8ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_small_number_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_small_number_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostBySmallNumberRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_small_number_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_small_number_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostBySmallNumberRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py index 91a8f4e79e..9499c4998d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py @@ -79,18 +79,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_date_time_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -140,17 +184,62 @@ class BaseApi(api_client.Api): class PostDateTimeFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_date_time_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_request_body_oapg( body=body, content_type=content_type, @@ -163,17 +252,62 @@ class PostDateTimeFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi index 2ea6b72249..e75c82d05c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi @@ -74,18 +74,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_date_time_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_date_time_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -135,17 +179,62 @@ class BaseApi(api_client.Api): class PostDateTimeFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_date_time_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_request_body_oapg( body=body, content_type=content_type, @@ -158,17 +247,62 @@ class PostDateTimeFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py index 61318d6c15..61c0e558b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_email_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostEmailFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_email_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostEmailFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi index add64eac3e..624a2c83bd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_email_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_email_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostEmailFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_email_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostEmailFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py index 70c9c4adb4..1d6fde1b75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with0_does_not_match_false_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with0_does_not_match_false_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi index da41c9f660..fc3b37cec2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with0_does_not_match_false_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with0_does_not_match_false_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py index 3dd0079389..e54e98dc38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with1_does_not_match_true_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with1_does_not_match_true_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi index 7e6b9c7d88..5dfa978e1f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with1_does_not_match_true_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with1_does_not_match_true_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py index c494044acb..abf4252d66 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi index 66f6004527..ae3cd9c56a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py index 402f766def..f13496bc39 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_false_does_not_match0_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_false_does_not_match0_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi index 66bac995f4..d2a2fb5b1a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_false_does_not_match0_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_false_does_not_match0_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py index 67e63b0793..cdda0d34c5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_true_does_not_match1_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_true_does_not_match1_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi index 86bd947259..ede86715a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_true_does_not_match1_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_true_does_not_match1_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py index 0027bd0edd..dc053602f5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enums_in_properties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enums_in_properties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostEnumsInPropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi index 0a75eb2c87..082bb8a018 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enums_in_properties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enums_in_properties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enums_in_properties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enums_in_properties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostEnumsInPropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py index 48139406bb..e1e4462162 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_forbidden_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_forbidden_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostForbiddenPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi index f22e0f5256..688fcb76f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_forbidden_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_forbidden_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_forbidden_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_forbidden_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostForbiddenPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py index 75bca7a9bd..531dc56c32 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_hostname_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostHostnameFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_hostname_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostHostnameFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi index abc778b44b..96b59201e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_hostname_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_hostname_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostHostnameFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_hostname_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostHostnameFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py index 1c0ac97d06..746839d1cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_integer_type_matches_integers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_integer_type_matches_integers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi index 80bcedea0d..a2d00a4f70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_integer_type_matches_integers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_integer_type_matches_integers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_integer_type_matches_integers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py index 849040ab75..a437389877 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi index 445d685511..15c6c30122 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(Base class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py index 024b72c736..27ac856881 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_string_value_for_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_string_value_for_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostInvalidStringValueForDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi index 7169769266..00c9f71b02 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_string_value_for_default_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_string_value_for_default_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostInvalidStringValueForDefaultRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py index 39e10fae46..9ffdb8d5be 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv4_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostIpv4FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv4_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostIpv4FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi index 7f98cc50cb..21a1c8c504 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv4_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv4_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostIpv4FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv4_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostIpv4FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py index c219571568..8fb701cc61 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv6_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostIpv6FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv6_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostIpv6FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi index 1821121e7f..b50a09052e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv6_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv6_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostIpv6FormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv6_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostIpv6FormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py index 86c63e8613..1ad92bc825 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_json_pointer_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_json_pointer_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostJsonPointerFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi index ef95d65450..4e2d9ef6c5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_json_pointer_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_json_pointer_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_json_pointer_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostJsonPointerFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py index acc6b58ca3..982f83c735 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaximumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaximumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi index 7282d631f8..a0723cca70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaximumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaximumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py index c4be0df8c1..fcf0f9c4e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi index 419cb115fd..4e5c945af5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_with_unsigned_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py index 791e11c7e1..08f984ff02 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaxitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi index ab7f2144ff..a42d2f09c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaxitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py index 82baa3c6f7..d9f0c7ca46 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaxlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi index 1918c7c22e..b2e42052a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaxlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py index 0079983d6b..8df9e45dde 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi index cba498b985..544af50745 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties0_means_the_object_is_empty_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py index 302911bb64..67fd2d8ab4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi index ab37e826c1..5119d69b5e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMaxpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py index 2a163fda70..b1e1c0d227 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMinimumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMinimumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi index 90fa06c9d1..0e7fa1996f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMinimumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMinimumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py index ab89cbd51a..78129065be 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_with_signed_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_with_signed_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi index 2147aea2aa..c8539721b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_with_signed_integer_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_with_signed_integer_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py index 790e6b1f16..e6282c3f44 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMinitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMinitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi index bcf1abf415..d755c0d755 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMinitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMinitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py index 5dab68c54b..192b4f1d15 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMinlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMinlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi index a7c977dbf8..7436c84bb2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minlength_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minlength_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMinlengthValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minlength_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minlength_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMinlengthValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py index 330ee1d704..e616271212 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostMinpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi index 07c74d49b4..2d4602b4aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minproperties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minproperties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minproperties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minproperties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostMinpropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py index 7bb6109e92..04886b3f9f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi index 4c749d8368..ba2e00fa21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_allof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py index 4779c8462a..ddfa4e71d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi index c10f472591..b660117c48 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_anyof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py index c7755c17e6..2072cebde7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostNestedItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostNestedItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi index 9a6f7d5605..f46fe5841f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostNestedItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostNestedItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py index f730d31d60..eeeb6bfee2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi index 498a3c7365..fa49ae4894 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_oneof_to_check_validation_semantics_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py index 2d230e0cfb..7d44a344cc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py @@ -127,18 +127,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_more_complex_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -188,17 +232,62 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_more_complex_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_request_body_oapg( body=body, content_type=content_type, @@ -211,17 +300,62 @@ class PostNotMoreComplexSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi index 17498e67f7..5f1d96b0b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi @@ -122,18 +122,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_more_complex_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_more_complex_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -183,17 +227,62 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_more_complex_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_request_body_oapg( body=body, content_type=content_type, @@ -206,17 +295,62 @@ class PostNotMoreComplexSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py index e7d0b18692..1fdc493740 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi index bbc798b3e3..ef2e02253e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py index 649b84303c..d4b9e53a03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nul_characters_in_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nul_characters_in_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostNulCharactersInStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi index 766d94fffa..7445caa5a5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nul_characters_in_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nul_characters_in_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nul_characters_in_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostNulCharactersInStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py index 84484c13f6..c94d8b66af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_null_type_matches_only_the_null_object_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_null_type_matches_only_the_null_object_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi index 4a3ee5ca30..6adc097d24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_null_type_matches_only_the_null_object_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_null_type_matches_only_the_null_object_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_null_type_matches_only_the_null_object_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, None, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py index 2629e12769..1ca4120948 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_number_type_matches_numbers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_number_type_matches_numbers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostNumberTypeMatchesNumbersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi index ff70018272..f4f08b5ead 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_number_type_matches_numbers_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_number_type_matches_numbers_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_number_type_matches_numbers_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostNumberTypeMatchesNumbersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, decimal.Decimal, int, float, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py index 84ca8ee87d..6b2af7b5d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_properties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_properties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostObjectPropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi index 4a54bcd80f..0a0ecb89fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_properties_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_properties_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_properties_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_properties_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostObjectPropertiesValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py index 2b0ee54844..9458ed3bdb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_type_matches_objects_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_type_matches_objects_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostObjectTypeMatchesObjectsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi index 0b63e04eb3..26a3aa0e9d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_type_matches_objects_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_type_matches_objects_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_type_matches_objects_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_type_matches_objects_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostObjectTypeMatchesObjectsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py index e73ff6bb6c..1e9c85a757 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostOneofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi index 422d449429..5c61455e78 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_complex_types_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_complex_types_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_complex_types_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_complex_types_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostOneofComplexTypesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py index 3cd6520a22..bc372832e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi index fbc36a3e4a..78a9a83c94 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py index 62a4284268..8d00db16b5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi index 9d6eaddc13..0d4fe45599 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_base_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_base_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_base_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostOneofWithBaseSchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py index dc18b181d7..de00a1e19e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostOneofWithEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi index d9436596ab..2d41910403 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_empty_schema_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_empty_schema_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostOneofWithEmptySchemaRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py index 30049110ff..e32e6df399 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_required_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_required_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostOneofWithRequiredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi index b5f3241f4d..b75ad8f9a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_required_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_required_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_required_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_required_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostOneofWithRequiredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py index e9f5746f22..c5120a7acd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_is_not_anchored_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_is_not_anchored_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi index e488457673..1848470356 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_is_not_anchored_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_is_not_anchored_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostPatternIsNotAnchoredRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py index 0aee314d2d..422b433e46 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostPatternValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostPatternValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi index 952dcdc9fa..d812670966 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostPatternValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostPatternValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py index 2e5a74862f..bcc74a2ae9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_properties_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_properties_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi index 1b22713ef2..1bab1c15f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_properties_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_properties_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py index dbcef6a143..a176ec4b34 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi index 241b2ae7d1..ff3985bce8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_property_named_ref_that_is_not_a_reference_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py index 79a9a3d746..baae0992b5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_additionalproperties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_additionalproperties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInAdditionalpropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi index 3d2514fbed..ae66e236ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_additionalproperties_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_additionalproperties_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInAdditionalpropertiesRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py index dba5814622..32d5d6cba9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi index 0c9d567d33..6eddfe043b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_allof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_allof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInAllofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_allof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_allof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInAllofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py index 55240469c5..c61b0c0346 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi index f4f9a7b1a4..61d129a8cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_anyof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_anyof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInAnyofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_anyof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_anyof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInAnyofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py index 7084e02696..3cf5261cef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi index 34f7287cf0..b41e000b84 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_items_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_items_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInItemsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_items_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_items_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInItemsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py index 67420c4380..16778e01bf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py @@ -83,18 +83,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -144,17 +188,62 @@ class BaseApi(api_client.Api): class PostRefInNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_request_body_oapg( body=body, content_type=content_type, @@ -167,17 +256,62 @@ class PostRefInNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi index 303f27c5bc..18e7489d24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi @@ -78,18 +78,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_not_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_not_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostRefInNotRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_not_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostRefInNotRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py index bc819760be..f1dc48460c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi index 34109a993b..e3ca8f0a1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_oneof_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_oneof_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInOneofRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_oneof_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_oneof_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInOneofRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py index c90390d336..bc58c723b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRefInPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRefInPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi index cc614f379b..105713baa0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_property_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_property_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRefInPropertyRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_property_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_property_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRefInPropertyRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py index d69ac9a8f7..b290ef0c3c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_default_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_default_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRequiredDefaultValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi index 43e3423d7a..78d8bb0262 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_default_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_default_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_default_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_default_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRequiredDefaultValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py index 53032cc735..31366c3fd8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRequiredValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRequiredValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi index a209a78e36..a0149cd11b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRequiredValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRequiredValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py index d4e6b18bf5..828d01bed2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_empty_array_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_empty_array_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostRequiredWithEmptyArrayRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi index 648231aa56..6490beb525 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_empty_array_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_empty_array_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_empty_array_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_empty_array_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostRequiredWithEmptyArrayRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py index 92d5b60538..5546b1c722 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py @@ -86,18 +86,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -147,17 +191,62 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -170,17 +259,62 @@ class PostRequiredWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi index 946dc98663..4b9319331a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi @@ -81,18 +81,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_escaped_characters_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -142,17 +186,62 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_escaped_characters_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, @@ -165,17 +254,62 @@ class PostRequiredWithEscapedCharactersRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py index 1b16f9380e..48ce45ab21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_simple_enum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_simple_enum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostSimpleEnumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi index 8fdb049516..b0ba5e5753 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_simple_enum_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_simple_enum_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_simple_enum_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_simple_enum_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostSimpleEnumValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py index 70baebb1f6..6db3472e65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py @@ -56,18 +56,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_string_type_matches_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_string_type_matches_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_request_body_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi index 66e8f33e0f..241d59964c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi @@ -51,18 +51,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_string_type_matches_strings_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_string_type_matches_strings_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_string_type_matches_strings_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_string_type_matches_strings_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_request_body_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class PostStringTypeMatchesStringsRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py index 19e0a5ce46..baaf238e68 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(Ba class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi index e652a6ce5a..50cbe14533 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(Ba class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py index fd7400f111..2d9e8e8482 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_false_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_false_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi index d4f41d180e..f1cb3b3ce3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_false_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_false_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostUniqueitemsFalseValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py index cf364bf948..75738c8906 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class PostUniqueitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi index b6a1a425d3..471f7aa06b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_validation_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_validation_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_validation_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_validation_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_request_body_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class PostUniqueitemsValidationRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py index fe898546b5..01f1e01a38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostUriFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostUriFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi index b3f45cc058..bd57141d4f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostUriFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostUriFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py index 49bd115c0c..ac7b2ca12e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_reference_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_reference_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostUriReferenceFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi index a859644f99..32efe64f38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_reference_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_reference_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_reference_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostUriReferenceFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py index aef3129629..ecbb8a5992 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py @@ -78,18 +78,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_template_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -139,17 +183,62 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_template_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_request_body_oapg( body=body, content_type=content_type, @@ -162,17 +251,62 @@ class PostUriTemplateFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi index 41c8e8ca96..c11c280ca8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi @@ -73,18 +73,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_template_format_request_body_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_template_format_request_body_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -134,17 +178,62 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatRequestBody(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_template_format_request_body( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_request_body( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_request_body_oapg( body=body, content_type=content_type, @@ -157,17 +246,62 @@ class PostUriTemplateFormatRequestBody(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_request_body_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py index d483b56496..a26ef4d234 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForCon class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi index ecf94ba86a..d1507bf9f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForCon class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py index 43d6a536f1..dbe7ce6e67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(Bas class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi index a29cd550c7..c248434a47 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(Bas class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py index 27943fe18a..a4195f8bec 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi index feaf38ff33..82150f4679 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py index bd2a1a7f0d..3783c4bff5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTy class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi index 65faa596e5..901c227bbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTy class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py index ed6ee20d1e..ea70220749 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi index efc5a0d8a6..966c85fbff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py index bb8cfc8a81..4c7e148515 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi index 2c35f82065..983e72c024 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py index 3503c97dde..04dc25c28d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_simple_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_simple_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_simple_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi index 83331bab13..17fb582dc3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_simple_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_simple_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_simple_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_simple_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_simple_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py index 6e77ac1422..e0ec00ff54 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi index 61e241797c..203f7e9833 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py index edbc007e87..db5c47fe16 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi index 1f663d3710..6458869c87 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py index 389f9b8420..1cc370ae25 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi index 1080e7777e..885e09eaa5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py index 51c81cc92a..8e550c0e2a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi index b1ff4b155d..7ce32b9623 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py index 3abf106625..a8336a1284 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_two_empty_schemas_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi index ac062d91a1..ad1d640063 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_allof_with_two_empty_schemas_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py index 23c53bc9e6..61104a1a4b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_complex_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_complex_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi index b0a9f0d4ed..686b9db9f7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_complex_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_complex_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py index b12f52012a..4f1056d49a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi index 82fc25630a..d95e2fb269 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py index 4d47659f0b..cb7e1a5bdb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi index 6ef98d0ec8..4a1ef40878 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py index 5da3279532..dc5293f4aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi index 1d5830c028..2937f62ea2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_anyof_with_one_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py index 1414fa62e8..5cc8abd84a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_array_type_matches_arrays_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_array_type_matches_arrays_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi index cf116ce47a..de0a2d5865 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_array_type_matches_arrays_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_array_type_matches_arrays_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_array_type_matches_arrays_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py index a95f03b4e4..db449dae16 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_boolean_type_matches_booleans_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi index 58b6aa58d7..8a82428ed2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_boolean_type_matches_booleans_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py index 41034fa697..7b33589740 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_int_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostByIntResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_int_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_int_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostByIntResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi index 3d9f71836d..ddbd626545 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_int_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_int_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostByIntResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_int_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_int_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_int_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostByIntResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_int_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py index e904ed1a38..5ca4e97bda 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostByNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_number_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_number_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostByNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi index ecca7dee4c..3b889482a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostByNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_number_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_number_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostByNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py index 2c4392f1e1..919173804e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_small_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostBySmallNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_small_number_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_small_number_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostBySmallNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi index 68dcdbf80f..624538655e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_by_small_number_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostBySmallNumberResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_by_small_number_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_by_small_number_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_by_small_number_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostBySmallNumberResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_by_small_number_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py index f2376a2df1..7671740107 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py @@ -78,17 +78,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_date_time_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -128,16 +155,44 @@ class BaseApi(api_client.Api): class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_date_time_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -149,16 +204,44 @@ class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi index 937646efc7..af7e94cd9a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi @@ -73,17 +73,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_date_time_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -123,16 +150,44 @@ class BaseApi(api_client.Api): class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_date_time_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_date_time_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_date_time_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -144,16 +199,44 @@ class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_date_time_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py index a87120ac47..84ceb9f853 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_email_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostEmailFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_email_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostEmailFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi index 3154ac4e53..873bf91676 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_email_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_email_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostEmailFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_email_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_email_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_email_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostEmailFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_email_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py index a87fc39eb2..b5b4c1392a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with0_does_not_match_false_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi index aa571b52ca..3bafefb7aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with0_does_not_match_false_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py index d5b4bde7a6..2b2e15e491 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with1_does_not_match_true_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi index ceae471846..207a6acb0c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with1_does_not_match_true_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py index b37e49aabc..c3a46becdd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi index 6b2e4ef65e..1f98603a73 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py index 98ebe09f38..7230c68ea2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_false_does_not_match0_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi index 0207c9513e..8c5611e6ec 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_false_does_not_match0_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py index 159ce75a12..fef0e8c61e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_true_does_not_match1_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi index d79cadd9d5..fdcec3d0b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enum_with_true_does_not_match1_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py index bc9fca7209..ad9d898342 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enums_in_properties_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enums_in_properties_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enums_in_properties_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi index 96c19414e0..f3e7352a9d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_enums_in_properties_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_enums_in_properties_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_enums_in_properties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_enums_in_properties_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_enums_in_properties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py index fad8e99f1c..0d7ba92648 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_forbidden_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_forbidden_property_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_forbidden_property_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi index 19a5f019e4..fdb543ed0c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_forbidden_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_forbidden_property_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_forbidden_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_forbidden_property_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_forbidden_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py index 188dcc891d..db71744866 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_hostname_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostHostnameFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_hostname_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostHostnameFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi index 047b3dc55d..5e743f86d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_hostname_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostHostnameFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_hostname_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_hostname_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_hostname_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostHostnameFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_hostname_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py index 70954d9069..9c89b09ba7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_integer_type_matches_integers_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_integer_type_matches_integers_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi index 55f4fa439f..d8c15f8b3e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_integer_type_matches_integers_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_integer_type_matches_integers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_integer_type_matches_integers_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py index 02dc4227f6..42efb7a3b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForC class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi index 72090830d3..e9a1d5381c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForC class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py index 35d6dd815f..3efddb842f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_string_value_for_default_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_string_value_for_default_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi index 8814f1d549..3ddd4b967d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_invalid_string_value_for_default_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_invalid_string_value_for_default_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_invalid_string_value_for_default_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py index dacd310a9d..3a909408c1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv4_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostIpv4FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv4_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostIpv4FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi index c0a1f9e878..c33a67b768 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv4_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostIpv4FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv4_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv4_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv4_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostIpv4FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv4_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py index 435bb55a50..50675e4975 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv6_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostIpv6FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv6_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostIpv6FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi index fd04aba9e5..671be4e1b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ipv6_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostIpv6FormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ipv6_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ipv6_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ipv6_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostIpv6FormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ipv6_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py index 4bca287695..e14fec5a32 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_json_pointer_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_json_pointer_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi index 911e34bdf2..b15178f375 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_json_pointer_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_json_pointer_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_json_pointer_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_json_pointer_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_json_pointer_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py index b9415262a1..014815369d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaximumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaximumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi index 42e2a091c7..67f10e833c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaximumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaximumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py index 7ae8eea54d..2d6a599008 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi index ba637150a1..7dc51f79d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseAp class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py index 5a63caab15..4922837883 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi index 762dff4b02..7976bfe5b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py index b6728ece2d..857194aedd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxlength_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxlength_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi index 6879b598b5..722b323171 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxlength_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxlength_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py index 9cd2ab6c99..2f1fe908a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi index 7cb80295f0..906b57dca1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py index 1e23926f48..caef224ec8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi index 4867e4d38f..a12bafc024 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_maxproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_maxproperties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_maxproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_maxproperties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_maxproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py index 83e3cf4aa3..455b40680e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMinimumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMinimumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi index 92a38918b2..3ecf130dc0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMinimumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMinimumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py index 2576206d66..c7dbae7b64 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi) class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi index 77297ce3d6..4a94bf8db0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi) class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py index c11c502c99..05ed4ee8bb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi index 329d06f543..c9e8bb7a6f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py index 1df42fe437..fd1d4f2d1a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minlength_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minlength_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi index 1d3bc58d84..a67f5177d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minlength_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minlength_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minlength_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minlength_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minlength_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py index f0c3b54b66..7fe9a3c69b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minproperties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minproperties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi index a4cc590d02..9684d04445 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_minproperties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_minproperties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_minproperties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_minproperties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_minproperties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py index 9c70aa0da9..e29ea0fbc5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 0d6f8d84f5..4810724d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py index ef2dfc15ad..3489d66401 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 236e09bd4b..80692348d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py index 026c086eae..492ff13454 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostNestedItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_items_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_items_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostNestedItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi index 8fb02abc72..df06609b95 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostNestedItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_items_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_items_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostNestedItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py index 741442c170..d4e4887665 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 88c149b9ef..7d498d603b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseA class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py index 13c61e239a..6bc017808f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py @@ -126,17 +126,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -176,16 +203,44 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_more_complex_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -197,16 +252,44 @@ class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi index 6a046c21bc..3957b33cb1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi @@ -121,17 +121,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -171,16 +198,44 @@ class BaseApi(api_client.Api): class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_more_complex_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_more_complex_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_more_complex_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -192,16 +247,44 @@ class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_more_complex_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py index c77e664773..03d9ffcda1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi index 50eac852dd..7b2fa049ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_not_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_not_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py index 2c3c024b32..8337995803 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nul_characters_in_strings_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nul_characters_in_strings_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi index 71eaa5319d..017495d5d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_nul_characters_in_strings_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_nul_characters_in_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_nul_characters_in_strings_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py index b715f68319..3ad92b9b8f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi index 171e41262d..199f916cee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py index 271b13e2fe..cde93c72ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_number_type_matches_numbers_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_number_type_matches_numbers_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi index 2fddb1916b..6e88c42dd6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_number_type_matches_numbers_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_number_type_matches_numbers_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_number_type_matches_numbers_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py index 475dc9ab22..e5e9f0db80 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_properties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_properties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_properties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi index 77a66a20a2..47259e1d4e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_properties_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_properties_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_properties_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_properties_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_properties_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py index 5cc62d65ea..4637ea3d38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_type_matches_objects_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_type_matches_objects_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi index 17761ab2ae..5c554c8ce2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_object_type_matches_objects_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_object_type_matches_objects_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_object_type_matches_objects_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_object_type_matches_objects_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py index 495b4e83a3..0670aeb2be 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_complex_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_complex_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi index ef4e3db4b7..a3801d37e4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_complex_types_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_complex_types_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_complex_types_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_complex_types_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_complex_types_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py index 0eef467c0c..473bcca1fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi index 0e80941b94..ef5fdf6e1c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py index fbdb23c28b..ad58937033 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi index a4520fbcbc..95e8f8bff4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_base_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_base_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_base_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py index 13d5070129..a2936bd0d6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi index 8be646f64b..de60f66e0b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_empty_schema_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_empty_schema_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_empty_schema_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py index 75138d3605..a05894d401 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_required_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_required_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_required_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi index b37d5504ca..f48e1c66e4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_oneof_with_required_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_oneof_with_required_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_oneof_with_required_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_oneof_with_required_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_oneof_with_required_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py index 9379092884..e1274eb003 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_is_not_anchored_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_is_not_anchored_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi index aad1c7292f..128e1246ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_is_not_anchored_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_is_not_anchored_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_is_not_anchored_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py index cac793efa5..a12b35e167 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostPatternValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostPatternValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi index 30a1e571a9..2e1b4cbec5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_pattern_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostPatternValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_pattern_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_pattern_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_pattern_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostPatternValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_pattern_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py index 8f5b60de97..936ad66657 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_properties_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_properties_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi index 3abc1bc846..7e41369c86 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_properties_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_properties_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_properties_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py index 211b708f84..d05ed431c8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi index 4fe3e9e7e2..8bb97630bc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py index 3646ddfac5..a91f8813a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_additionalproperties_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_additionalproperties_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi index 86122e765d..900f555421 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_additionalproperties_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_additionalproperties_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_additionalproperties_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py index ba24667423..fcae793b61 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_allof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_allof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi index 05601b1850..265a672db3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_allof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInAllofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_allof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_allof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_allof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInAllofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_allof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py index e9c7e40f86..8e4026bb2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_anyof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_anyof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi index a08c876cc6..a2d53f3dad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_anyof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInAnyofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_anyof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_anyof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_anyof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInAnyofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_anyof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py index aba91337cb..d6faf25623 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_items_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_items_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi index 471e8d359e..7ac9c2f3dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_items_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInItemsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_items_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_items_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_items_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInItemsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_items_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py index bc13e0d26f..d289f34e4c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py @@ -82,17 +82,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -132,16 +159,44 @@ class BaseApi(api_client.Api): class PostRefInNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_not_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -153,16 +208,44 @@ class PostRefInNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi index e3751f78f0..3b8376118f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_not_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostRefInNotResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_not_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_not_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_not_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostRefInNotResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_not_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py index 4423ea9449..c4173c7164 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi index fac7d3b0d8..78aec76544 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_oneof_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInOneofResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_oneof_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_oneof_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_oneof_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInOneofResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_oneof_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py index a9eccf664b..8c919aea71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRefInPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_property_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_property_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRefInPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi index d6347ad6ae..87b6d58596 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_ref_in_property_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRefInPropertyResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_ref_in_property_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_ref_in_property_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_ref_in_property_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRefInPropertyResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_ref_in_property_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py index f7784ead0f..2f071fcad9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_default_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_default_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_default_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi index 4b997ec3fd..ba9ce4b930 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_default_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_default_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_default_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_default_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_default_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py index 15344cdfa1..feece12371 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRequiredValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRequiredValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi index 28fb2e0eb9..0c226b3e2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRequiredValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRequiredValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py index 545abfd36d..ae3f890c1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_empty_array_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_empty_array_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_empty_array_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi index 8f1704180f..550654feff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_empty_array_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_empty_array_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_empty_array_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_empty_array_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_empty_array_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py index 7cea48d8b9..837f66395a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py @@ -85,17 +85,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -135,16 +162,44 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -156,16 +211,44 @@ class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi index 96c162a0db..38ff81848c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi @@ -80,17 +80,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,16 +157,44 @@ class BaseApi(api_client.Api): class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_required_with_escaped_characters_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_required_with_escaped_characters_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_required_with_escaped_characters_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -151,16 +206,44 @@ class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py index 0b13886849..f33666b2d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_simple_enum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_simple_enum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_simple_enum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi index f447b0b2ed..525cc8b427 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_simple_enum_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_simple_enum_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_simple_enum_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_simple_enum_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_simple_enum_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py index 24f9a28f28..232e64e2fd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -105,16 +132,44 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_string_type_matches_strings_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_string_type_matches_strings_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -126,16 +181,44 @@ class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi index a8273f1b16..92cb39e7f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -100,16 +127,44 @@ class BaseApi(api_client.Api): class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_string_type_matches_strings_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_string_type_matches_strings_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_string_type_matches_strings_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -121,16 +176,44 @@ class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_string_type_matches_strings_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py index 23de1c70c5..7ec32ffcd5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyFo class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi index e9cd136c49..5e4fef20ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyFo class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py index 32ec15a6bf..2ca6488bc1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_false_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_false_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi index 66609e60b0..3054b49516 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_false_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_false_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_false_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py index 531cab800b..c4f75d43a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi index c09e072b67..b8d23d3e76 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uniqueitems_validation_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uniqueitems_validation_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uniqueitems_validation_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uniqueitems_validation_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py index 252fb5f084..b0bb6afea9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostUriFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostUriFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi index 657918c5de..aec6e6c16f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostUriFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostUriFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py index d160addbec..b0f9310247 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_reference_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_reference_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi index 4bba84c0b1..3de5191676 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_reference_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_reference_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_reference_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_reference_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_reference_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py index b418915fba..1eea3901e9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py @@ -77,17 +77,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_template_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -127,16 +154,44 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_template_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -148,16 +203,44 @@ class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi index 1cf7bd74ca..06064e29e7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi @@ -72,17 +72,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _post_uri_template_format_response_body_for_content_types_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -122,16 +149,44 @@ class BaseApi(api_client.Api): class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def post_uri_template_format_response_body_for_content_types( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_uri_template_format_response_body_for_content_types( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_uri_template_format_response_body_for_content_types( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, @@ -143,16 +198,44 @@ class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._post_uri_template_format_response_body_for_content_types_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index cb395d6b6b..b931cc044f 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -53,6 +53,8 @@ class RequestField(RequestFieldBase): class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + def default(self, obj): if isinstance(obj, str): return str(obj) @@ -324,8 +326,25 @@ class StyleSimpleSerializer(ParameterSerializerBase): ) +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + @dataclass -class ParameterBase: +class ParameterBase(JSONDetector): name: str in_type: ParameterInType required: bool @@ -352,7 +371,6 @@ class ParameterBase: } __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() - _json_content_type = 'application/json' @classmethod def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): @@ -399,8 +417,11 @@ class ParameterBase: def _serialize_json( self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) return json.dumps(in_data) @@ -495,7 +516,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -513,7 +534,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode super().__init__( @@ -576,8 +597,6 @@ class QueryParameter(ParameterBase, StyleFormSerializer): return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if not self.schema: - return None if self.style is ParameterStyle.FORM: return PrefixSeparatorIterator('?', '&') elif self.style is ParameterStyle.SPACE_DELIMITED: @@ -616,12 +635,17 @@ class QueryParameter(ParameterBase, StyleFormSerializer): elif self.style is ParameterStyle.PIPE_DELIMITED: return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -680,7 +704,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -737,7 +761,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -800,23 +824,6 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - class OpenApiResponse(JSONDetector): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') @@ -991,7 +998,7 @@ class ApiClient: self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} + self.default_headers = HTTPHeaderDict() if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1048,15 +1055,18 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or HTTPHeaderDict() - headers.update(self.default_headers) + used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(headers, + self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) + # request url if host is None: url = self.configuration.host + resource_path @@ -1068,7 +1078,7 @@ class ApiClient: response = self.request( method, url, - headers=headers, + headers=used_headers, fields=fields, body=body, stream=stream, diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py index 3a8b7367d8..593d61673a 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py @@ -105,18 +105,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _custom_server_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Use custom server :param skip_deserialization: If true then api_response.response will be set but @@ -160,17 +190,48 @@ class BaseApi(api_client.Api): class CustomServer(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def custom_server( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def custom_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def custom_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def custom_server( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._custom_server_oapg( accept_content_types=accept_content_types, host_index=host_index, @@ -183,17 +244,48 @@ class CustomServer(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._custom_server_oapg( accept_content_types=accept_content_types, host_index=host_index, diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi index 698792fd15..1fd19d9ea6 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi @@ -50,18 +50,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _custom_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _custom_server_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Use custom server :param skip_deserialization: If true then api_response.response will be set but @@ -105,17 +135,48 @@ class BaseApi(api_client.Api): class CustomServer(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def custom_server( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def custom_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def custom_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def custom_server( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._custom_server_oapg( accept_content_types=accept_content_types, host_index=host_index, @@ -128,17 +189,48 @@ class CustomServer(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._custom_server_oapg( accept_content_types=accept_content_types, host_index=host_index, diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py index 8a4be028c4..a4e2fdce47 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py @@ -55,17 +55,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _default_server_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Use default server :param skip_deserialization: If true then api_response.response will be set but @@ -106,16 +133,44 @@ class BaseApi(api_client.Api): class DefaultServer(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def default_server( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def default_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def default_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def default_server( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._default_server_oapg( accept_content_types=accept_content_types, stream=stream, @@ -127,16 +182,44 @@ class DefaultServer(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._default_server_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi index 28e35b4b46..89e925ed40 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi @@ -50,17 +50,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _default_server_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _default_server_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Use default server :param skip_deserialization: If true then api_response.response will be set but @@ -101,16 +128,44 @@ class BaseApi(api_client.Api): class DefaultServer(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def default_server( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def default_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def default_server( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def default_server( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._default_server_oapg( accept_content_types=accept_content_types, stream=stream, @@ -122,16 +177,44 @@ class DefaultServer(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._default_server_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt b/samples/openapi3/client/features/dynamic-servers/python/requirements.txt index c9227e58a1..3cb6612669 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt +++ b/samples/openapi3/client/features/dynamic-servers/python/requirements.txt @@ -1,5 +1,6 @@ -certifi >= 14.05.14 -frozendict >= 2.0.3 -python_dateutil >= 2.5.3 +certifi >= 14.5.14 +frozendict ~= 2.3.4 +python-dateutil ~= 2.7.0 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +typing_extensions ~= 4.3.0 +urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/features/dynamic-servers/python/setup.py b/samples/openapi3/client/features/dynamic-servers/python/setup.py index 5723b62805..4c1b543715 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/setup.py +++ b/samples/openapi3/client/features/dynamic-servers/python/setup.py @@ -21,11 +21,12 @@ VERSION = "1.0.0" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.15", - "certifi", - "python-dateutil", - "frozendict >= 2.0.3", - "typing_extensions", + "certifi >= 14.5.14", + "frozendict ~= 2.3.4", + "python-dateutil ~= 2.7.0", + "setuptools >= 21.0.0", + "typing_extensions ~= 4.3.0", + "urllib3 ~= 1.26.7", ] setup( diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index e0101d4f2c..7c9d0509b7 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -197,6 +197,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**object_in_query**](docs/apis/tags/FakeApi.md#object_in_query) | **get** /fake/objInQuery | user list *FakeApi* | [**object_model_with_ref_props**](docs/apis/tags/FakeApi.md#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | *FakeApi* | [**parameter_collisions**](docs/apis/tags/FakeApi.md#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case +*FakeApi* | [**query_param_with_json_content_type**](docs/apis/tags/FakeApi.md#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type *FakeApi* | [**query_parameter_collection_format**](docs/apis/tags/FakeApi.md#query_parameter_collection_format) | **put** /fake/test-query-paramters | *FakeApi* | [**ref_object_in_query**](docs/apis/tags/FakeApi.md#ref_object_in_query) | **get** /fake/refObjInQuery | user list *FakeApi* | [**response_without_schema**](docs/apis/tags/FakeApi.md#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index ad2384b124..e869010286 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -29,6 +29,7 @@ Method | HTTP request | Description [**object_in_query**](#object_in_query) | **get** /fake/objInQuery | user list [**object_model_with_ref_props**](#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | [**parameter_collisions**](#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case +[**query_param_with_json_content_type**](#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type [**query_parameter_collection_format**](#query_parameter_collection_format) | **put** /fake/test-query-paramters | [**ref_object_in_query**](#ref_object_in_query) | **get** /fake/refObjInQuery | user list [**response_without_schema**](#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema @@ -1009,10 +1010,10 @@ Key | Input Type | Accessed Type | Description | Notes Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#endpoint_parameters.ApiResponseFor400) | Invalid username supplied +200 | [ApiResponseFor200](#endpoint_parameters.ApiResponseFor200) | Success 404 | [ApiResponseFor404](#endpoint_parameters.ApiResponseFor404) | User not found -#### endpoint_parameters.ApiResponseFor400 +#### endpoint_parameters.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1206,10 +1207,10 @@ str, | str, | | must be one of ["_abc", "-efg", "(xyz)", ] if omitted the ser Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#enum_parameters.ApiResponseFor400) | Invalid request +200 | [ApiResponseFor200](#enum_parameters.ApiResponseFor200) | Success 404 | [ApiResponseFor404](#enum_parameters.ApiResponseFor404) | Not found -#### enum_parameters.ApiResponseFor400 +#### enum_parameters.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1438,9 +1439,9 @@ bool, | BoolClass, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#group_parameters.ApiResponseFor400) | Someting wrong +200 | [ApiResponseFor200](#group_parameters.ApiResponseFor200) | succeeded -#### group_parameters.ApiResponseFor400 +#### group_parameters.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2671,6 +2672,87 @@ No authorization required [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) +# **query_param_with_json_content_type** + +> bool, date, datetime, dict, float, int, list, str, none_type query_param_with_json_content_type(some_param) + +query param with json content-type + +### Example + +```python +import petstore_api +from petstore_api.apis.tags import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'someParam': , + } + try: + # query param with json content-type + api_response = api_instance.query_param_with_json_content_type( + query_params=query_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->query_param_with_json_content_type: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +someParam | | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#query_param_with_json_content_type.ApiResponseFor200) | success + +#### query_param_with_json_content_type.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | + +### Authorization + +No authorization required + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **query_parameter_collection_format** > query_parameter_collection_format(pipeioutilhttpurlcontextref_param) diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md index f2d02572af..6b0fd83c5d 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md @@ -355,10 +355,10 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#delete_user.ApiResponseFor400) | Invalid username supplied +200 | [ApiResponseFor200](#delete_user.ApiResponseFor200) | Success 404 | [ApiResponseFor404](#delete_user.ApiResponseFor404) | User not found -#### delete_user.ApiResponseFor400 +#### delete_user.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 6238c9fbfd..d1b93ab5a6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -53,6 +53,8 @@ class RequestField(RequestFieldBase): class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + def default(self, obj): if isinstance(obj, str): return str(obj) @@ -324,8 +326,25 @@ class StyleSimpleSerializer(ParameterSerializerBase): ) +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + @dataclass -class ParameterBase: +class ParameterBase(JSONDetector): name: str in_type: ParameterInType required: bool @@ -352,7 +371,6 @@ class ParameterBase: } __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() - _json_content_type = 'application/json' @classmethod def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): @@ -399,8 +417,11 @@ class ParameterBase: def _serialize_json( self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) return json.dumps(in_data) @@ -495,7 +516,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -513,7 +534,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer): schema: typing.Optional[typing.Type[Schema]] = None, content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode super().__init__( @@ -576,8 +597,6 @@ class QueryParameter(ParameterBase, StyleFormSerializer): return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if not self.schema: - return None if self.style is ParameterStyle.FORM: return PrefixSeparatorIterator('?', '&') elif self.style is ParameterStyle.SPACE_DELIMITED: @@ -616,12 +635,17 @@ class QueryParameter(ParameterBase, StyleFormSerializer): elif self.style is ParameterStyle.PIPE_DELIMITED: return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -680,7 +704,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -737,7 +761,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer): for content_type, schema in self.content.items(): cast_in_data = schema(in_data) cast_in_data = self._json_encoder.default(cast_in_data) - if content_type == self._json_content_type: + if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) @@ -800,23 +824,6 @@ class ApiResponseWithoutDeserialization(ApiResponse): headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - class OpenApiResponse(JSONDetector): __filename_content_disposition_pattern = re.compile('filename="(.+?)"') @@ -991,7 +998,7 @@ class ApiClient: self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} + self.default_headers = HTTPHeaderDict() if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1048,15 +1055,18 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or HTTPHeaderDict() - headers.update(self.default_headers) + used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(headers, + self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) + # request url if host is None: url = self.configuration.host + resource_path @@ -1068,7 +1078,7 @@ class ApiClient: response = self.request( method, url, - headers=headers, + headers=used_headers, fields=fields, body=body, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py index 271292fb87..db788e6105 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py @@ -48,6 +48,7 @@ from petstore_api.apis.paths.fake_json_with_charset import FakeJsonWithCharset from petstore_api.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema from petstore_api.apis.paths.fake_json_patch import FakeJsonPatch from petstore_api.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId +from petstore_api.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType PathToApi = typing_extensions.TypedDict( 'PathToApi', @@ -99,6 +100,7 @@ PathToApi = typing_extensions.TypedDict( PathValues.FAKE_RESPONSE_WITHOUT_SCHEMA: FakeResponseWithoutSchema, PathValues.FAKE_JSON_PATCH: FakeJsonPatch, PathValues.FAKE_DELETE_COFFEE_ID: FakeDeleteCoffeeId, + PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE: FakeQueryParamWithJsonContentType, } ) @@ -151,5 +153,6 @@ path_to_api = PathToApi( PathValues.FAKE_RESPONSE_WITHOUT_SCHEMA: FakeResponseWithoutSchema, PathValues.FAKE_JSON_PATCH: FakeJsonPatch, PathValues.FAKE_DELETE_COFFEE_ID: FakeDeleteCoffeeId, + PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE: FakeQueryParamWithJsonContentType, } ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py new file mode 100644 index 0000000000..96aa0592a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py @@ -0,0 +1,7 @@ +from petstore_api.paths.fake_query_param_with_json_content_type.get import ApiForget + + +class FakeQueryParamWithJsonContentType( + ApiForget, +): + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py index a206fb090e..564d77038a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py @@ -33,6 +33,7 @@ from petstore_api.paths.fake_refs_number.post import NumberWithValidations from petstore_api.paths.fake_obj_in_query.get import ObjectInQuery from petstore_api.paths.fake_refs_object_model_with_ref_props.post import ObjectModelWithRefProps from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_.post import ParameterCollisions +from petstore_api.paths.fake_query_param_with_json_content_type.get import QueryParamWithJsonContentType from petstore_api.paths.fake_test_query_paramters.put import QueryParameterCollectionFormat from petstore_api.paths.fake_ref_obj_in_query.get import RefObjectInQuery from petstore_api.paths.fake_response_without_schema.get import ResponseWithoutSchema @@ -68,6 +69,7 @@ class FakeApi( ObjectInQuery, ObjectModelWithRefProps, ParameterCollisions, + QueryParamWithJsonContentType, QueryParameterCollectionFormat, RefObjectInQuery, ResponseWithoutSchema, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py index ef62b10d23..9b8c0ff4bb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py @@ -53,3 +53,4 @@ class PathValues(str, enum.Enum): FAKE_RESPONSE_WITHOUT_SCHEMA = "/fake/responseWithoutSchema" FAKE_JSON_PATCH = "/fake/jsonPatch" FAKE_DELETE_COFFEE_ID = "/fake/deleteCoffee/{id}" + FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE = "/fake/queryParamWithJsonContentType" diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py index 800c45e3ca..35b18c4fde 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py @@ -68,19 +68,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _call_123_test_special_tags_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test special tags :param skip_deserialization: If true then api_response.response will be set but @@ -134,18 +182,67 @@ class BaseApi(api_client.Api): class Call123TestSpecialTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def call_123_test_special_tags( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._call_123_test_special_tags_oapg( body=body, content_type=content_type, @@ -159,18 +256,67 @@ class Call123TestSpecialTags(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._call_123_test_special_tags_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi index 48f9122031..5c7dfa4851 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi @@ -63,19 +63,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _call_123_test_special_tags_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _call_123_test_special_tags_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test special tags :param skip_deserialization: If true then api_response.response will be set but @@ -129,18 +177,67 @@ class BaseApi(api_client.Api): class Call123TestSpecialTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def call_123_test_special_tags( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def call_123_test_special_tags( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._call_123_test_special_tags_oapg( body=body, content_type=content_type, @@ -154,18 +251,67 @@ class Call123TestSpecialTags(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._call_123_test_special_tags_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py index 1d7550bf63..17e3ac6559 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params RequiredStringGroupSchema = schemas.IntSchema RequiredInt64GroupSchema = schemas.Int64Schema StringGroupSchema = schemas.IntSchema @@ -79,7 +79,7 @@ request_query_int64_group = api_client.QueryParameter( schema=Int64GroupSchema, explode=True, ) -# header params +# Header params RequiredBooleanGroupSchema = schemas.BoolSchema BooleanGroupSchema = schemas.BoolSchema RequestRequiredHeaderParams = typing_extensions.TypedDict( @@ -118,32 +118,63 @@ _auth = [ @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) _status_code_to_response = { - '400': _response_for_400, + '200': _response_for_200, } class BaseApi(api_client.Api): + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _group_parameters_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Fake endpoint to test group parameters (optional) :param skip_deserialization: If true then api_response.response will be set but @@ -209,16 +240,48 @@ class BaseApi(api_client.Api): class GroupParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def group_parameters( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def group_parameters( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._group_parameters_oapg( query_params=query_params, header_params=header_params, @@ -231,16 +294,48 @@ class GroupParameters(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._group_parameters_oapg( query_params=query_params, header_params=header_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi index 689aa42854..c88235a264 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params RequiredStringGroupSchema = schemas.IntSchema RequiredInt64GroupSchema = schemas.Int64Schema StringGroupSchema = schemas.IntSchema @@ -77,7 +77,7 @@ request_query_int64_group = api_client.QueryParameter( schema=Int64GroupSchema, explode=True, ) -# header params +# Header params RequiredBooleanGroupSchema = schemas.BoolSchema BooleanGroupSchema = schemas.BoolSchema RequestRequiredHeaderParams = typing_extensions.TypedDict( @@ -113,29 +113,60 @@ request_header_boolean_group = api_client.HeaderParameter( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) class BaseApi(api_client.Api): + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _group_parameters_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _group_parameters_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Fake endpoint to test group parameters (optional) :param skip_deserialization: If true then api_response.response will be set but @@ -201,16 +232,48 @@ class BaseApi(api_client.Api): class GroupParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def group_parameters( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def group_parameters( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def group_parameters( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._group_parameters_oapg( query_params=query_params, header_params=header_params, @@ -223,16 +286,48 @@ class GroupParameters(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._group_parameters_oapg( query_params=query_params, header_params=header_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py index d69fbec4c6..f56f26eac5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params class EnumQueryStringArraySchema( @@ -186,7 +186,7 @@ request_query_enum_query_double = api_client.QueryParameter( schema=EnumQueryDoubleSchema, explode=True, ) -# header params +# Header params class EnumHeaderStringArraySchema( @@ -424,14 +424,14 @@ request_body_body = api_client.RequestBody( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -446,25 +446,78 @@ _response_for_404 = api_client.OpenApiResponse( response_cls=ApiResponseFor404, ) _status_code_to_response = { - '400': _response_for_400, + '200': _response_for_200, '404': _response_for_404, } class BaseApi(api_client.Api): - + @typing.overload def _enum_parameters_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _enum_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enum_parameters_oapg( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test enum parameters :param skip_deserialization: If true then api_response.response will be set but @@ -540,18 +593,72 @@ class BaseApi(api_client.Api): class EnumParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def enum_parameters( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def enum_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enum_parameters( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._enum_parameters_oapg( body=body, query_params=query_params, @@ -566,18 +673,72 @@ class EnumParameters(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._enum_parameters_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi index 9359afe333..a2468eb18d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params class EnumQueryStringArraySchema( @@ -153,7 +153,7 @@ request_query_enum_query_double = api_client.QueryParameter( schema=EnumQueryDoubleSchema, explode=True, ) -# header params +# Header params class EnumHeaderStringArraySchema( @@ -361,14 +361,14 @@ request_body_body = api_client.RequestBody( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -385,19 +385,72 @@ _response_for_404 = api_client.OpenApiResponse( class BaseApi(api_client.Api): - + @typing.overload def _enum_parameters_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _enum_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enum_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enum_parameters_oapg( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test enum parameters :param skip_deserialization: If true then api_response.response will be set but @@ -473,18 +526,72 @@ class BaseApi(api_client.Api): class EnumParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def enum_parameters( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def enum_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enum_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enum_parameters( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._enum_parameters_oapg( body=body, query_params=query_params, @@ -499,18 +606,72 @@ class EnumParameters(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._enum_parameters_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py index cb0a1d3c5a..5a5927a2b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py @@ -68,19 +68,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _client_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test \"client\" model :param skip_deserialization: If true then api_response.response will be set but @@ -134,18 +182,67 @@ class BaseApi(api_client.Api): class ClientModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def client_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._client_model_oapg( body=body, content_type=content_type, @@ -159,18 +256,67 @@ class ClientModel(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._client_model_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi index b89b07bb46..1cd6c45377 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi @@ -63,19 +63,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _client_model_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _client_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test \"client\" model :param skip_deserialization: If true then api_response.response will be set but @@ -129,18 +177,67 @@ class BaseApi(api_client.Api): class ClientModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def client_model( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def client_model( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._client_model_oapg( body=body, content_type=content_type, @@ -154,18 +251,67 @@ class ClientModel(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._client_model_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py index b732e5d610..5bded5d3e0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py @@ -311,14 +311,14 @@ _auth = [ @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -333,23 +333,68 @@ _response_for_404 = api_client.OpenApiResponse( response_cls=ApiResponseFor404, ) _status_code_to_response = { - '400': _response_for_400, + '200': _response_for_200, '404': _response_for_404, } class BaseApi(api_client.Api): + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _endpoint_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _endpoint_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 :param skip_deserialization: If true then api_response.response will be set but @@ -399,16 +444,62 @@ class BaseApi(api_client.Api): class EndpointParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def endpoint_parameters( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def endpoint_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def endpoint_parameters( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._endpoint_parameters_oapg( body=body, content_type=content_type, @@ -421,16 +512,62 @@ class EndpointParameters(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._endpoint_parameters_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi index 1f4966ce3d..a7dc2f6dec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi @@ -266,14 +266,14 @@ request_body_body = api_client.RequestBody( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -290,17 +290,62 @@ _response_for_404 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _endpoint_parameters_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _endpoint_parameters_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _endpoint_parameters_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 :param skip_deserialization: If true then api_response.response will be set but @@ -350,16 +395,62 @@ class BaseApi(api_client.Api): class EndpointParameters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def endpoint_parameters( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def endpoint_parameters( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def endpoint_parameters( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def endpoint_parameters( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._endpoint_parameters_oapg( body=body, content_type=content_type, @@ -372,16 +463,62 @@ class EndpointParameters(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._endpoint_parameters_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py index c1ee6c0144..c76f1c5798 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _additional_properties_with_array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Additional Properties with Array of Enums :param skip_deserialization: If true then api_response.response will be set but @@ -131,18 +179,67 @@ class BaseApi(api_client.Api): class AdditionalPropertiesWithArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def additional_properties_with_array_of_enums( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def additional_properties_with_array_of_enums( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def additional_properties_with_array_of_enums( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._additional_properties_with_array_of_enums_oapg( body=body, content_type=content_type, @@ -156,18 +253,67 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._additional_properties_with_array_of_enums_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi index 670f6a4119..13981bf475 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _additional_properties_with_array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _additional_properties_with_array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Additional Properties with Array of Enums :param skip_deserialization: If true then api_response.response will be set but @@ -126,18 +174,67 @@ class BaseApi(api_client.Api): class AdditionalPropertiesWithArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def additional_properties_with_array_of_enums( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def additional_properties_with_array_of_enums( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def additional_properties_with_array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def additional_properties_with_array_of_enums( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._additional_properties_with_array_of_enums_oapg( body=body, content_type=content_type, @@ -151,18 +248,67 @@ class AdditionalPropertiesWithArrayOfEnums(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._additional_properties_with_array_of_enums_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py index c6174989d1..481882c97f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _body_with_file_schema_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class BodyWithFileSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def body_with_file_schema( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_file_schema_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class BodyWithFileSchema(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_file_schema_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi index 74c2ccf302..7785729eb2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi @@ -53,18 +53,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _body_with_file_schema_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _body_with_file_schema_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -114,17 +158,62 @@ class BaseApi(api_client.Api): class BodyWithFileSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def body_with_file_schema( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def body_with_file_schema( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_file_schema_oapg( body=body, content_type=content_type, @@ -137,17 +226,62 @@ class BodyWithFileSchema(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_file_schema_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py index 3f34b57824..03d8d0b48f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py @@ -29,7 +29,7 @@ from petstore_api.model.user import User from . import path -# query params +# Query params QuerySchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', @@ -85,19 +85,67 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _body_with_query_params_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], - query_params: RequestQueryParams = frozendict.frozendict(), + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -161,18 +209,67 @@ class BaseApi(api_client.Api): class BodyWithQueryParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def body_with_query_params( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_query_params_oapg( body=body, query_params=query_params, @@ -186,18 +283,67 @@ class BodyWithQueryParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_query_params_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi index e524a4dc68..6e34838b84 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.user import User -# query params +# Query params QuerySchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', @@ -80,19 +80,67 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _body_with_query_params_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _body_with_query_params_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], - query_params: RequestQueryParams = frozendict.frozendict(), + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -156,18 +204,67 @@ class BaseApi(api_client.Api): class BodyWithQueryParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def body_with_query_params( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def body_with_query_params( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_query_params_oapg( body=body, query_params=query_params, @@ -181,18 +278,67 @@ class BodyWithQueryParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._body_with_query_params_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py index 1ecaf9befa..971de7cf96 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema @@ -89,17 +89,44 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _case_sensitive_params_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -149,16 +176,44 @@ class BaseApi(api_client.Api): class CaseSensitiveParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def case_sensitive_params( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def case_sensitive_params( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._case_sensitive_params_oapg( query_params=query_params, stream=stream, @@ -170,16 +225,44 @@ class CaseSensitiveParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._case_sensitive_params_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi index ee00de7813..69c3adfb97 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi @@ -24,7 +24,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema @@ -84,17 +84,44 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _case_sensitive_params_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _case_sensitive_params_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -144,16 +171,44 @@ class BaseApi(api_client.Api): class CaseSensitiveParams(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def case_sensitive_params( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def case_sensitive_params( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def case_sensitive_params( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._case_sensitive_params_oapg( query_params=query_params, stream=stream, @@ -165,16 +220,44 @@ class CaseSensitiveParams(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._case_sensitive_params_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py index adec01e9ae..72a085dbaf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py @@ -71,19 +71,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _classname_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test class name in snake case :param skip_deserialization: If true then api_response.response will be set but @@ -138,18 +186,67 @@ class BaseApi(api_client.Api): class Classname(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def classname( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._classname_oapg( body=body, content_type=content_type, @@ -163,18 +260,67 @@ class Classname(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._classname_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi index 13329719fd..055301928b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi @@ -63,19 +63,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _classname_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _classname_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ To test class name in snake case :param skip_deserialization: If true then api_response.response will be set but @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class Classname(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def classname( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def classname( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._classname_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class Classname(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._classname_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py index 3cc5cf64c1..6aeab76eac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# path params +# Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -83,18 +83,46 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_coffee_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete coffee :param skip_deserialization: If true then api_response.response will be set but @@ -147,17 +175,46 @@ class BaseApi(api_client.Api): class DeleteCoffee(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_coffee( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_coffee( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_coffee_oapg( path_params=path_params, stream=stream, @@ -169,17 +226,46 @@ class DeleteCoffee(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_coffee_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi index b3be2375f8..7a0240795e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi @@ -24,7 +24,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# path params +# Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -77,18 +77,46 @@ _response_for_default = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_coffee_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_coffee_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete coffee :param skip_deserialization: If true then api_response.response will be set but @@ -141,17 +169,46 @@ class BaseApi(api_client.Api): class DeleteCoffee(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_coffee( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_coffee( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_coffee( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_coffee_oapg( path_params=path_params, stream=stream, @@ -163,17 +220,46 @@ class DeleteCoffee(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_coffee_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py index 956d347dbd..f3ebfb0b65 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py @@ -57,17 +57,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _fake_health_get_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Health check endpoint :param skip_deserialization: If true then api_response.response will be set but @@ -108,16 +135,44 @@ class BaseApi(api_client.Api): class FakeHealthGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def fake_health_get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def fake_health_get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._fake_health_get_oapg( accept_content_types=accept_content_types, stream=stream, @@ -129,16 +184,44 @@ class FakeHealthGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._fake_health_get_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi index 8098f56eb4..f63161e2d2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi @@ -52,17 +52,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _fake_health_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _fake_health_get_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Health check endpoint :param skip_deserialization: If true then api_response.response will be set but @@ -103,16 +130,44 @@ class BaseApi(api_client.Api): class FakeHealthGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def fake_health_get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def fake_health_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def fake_health_get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._fake_health_get_oapg( accept_content_types=accept_content_types, stream=stream, @@ -124,16 +179,44 @@ class FakeHealthGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._fake_health_get_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py index e09fc626a5..2363305f7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py @@ -84,18 +84,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _inline_additional_properties_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ test inline additionalProperties :param skip_deserialization: If true then api_response.response will be set but @@ -146,17 +190,62 @@ class BaseApi(api_client.Api): class InlineAdditionalProperties(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def inline_additional_properties( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_additional_properties_oapg( body=body, content_type=content_type, @@ -169,17 +258,62 @@ class InlineAdditionalProperties(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_additional_properties_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi index ec6164cf7a..71113ab91a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi @@ -79,18 +79,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _inline_additional_properties_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _inline_additional_properties_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ test inline additionalProperties :param skip_deserialization: If true then api_response.response will be set but @@ -141,17 +185,62 @@ class BaseApi(api_client.Api): class InlineAdditionalProperties(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def inline_additional_properties( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_additional_properties( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_additional_properties_oapg( body=body, content_type=content_type, @@ -164,17 +253,62 @@ class InlineAdditionalProperties(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_additional_properties_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py index 43c746f71e..d7904db7a8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params class CompositionAtRootSchema( @@ -518,20 +518,86 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _inline_composition_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _inline_composition_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _inline_composition_oapg( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ testing composed schemas at inline locations :param skip_deserialization: If true then api_response.response will be set but @@ -598,19 +664,86 @@ class BaseApi(api_client.Api): class InlineComposition(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def inline_composition( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def inline_composition( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_composition( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_composition_oapg( body=body, query_params=query_params, @@ -625,19 +758,86 @@ class InlineComposition(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_composition_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi index 6fde8960de..56503791e7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params class CompositionAtRootSchema( @@ -495,20 +495,86 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _inline_composition_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _inline_composition_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _inline_composition_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _inline_composition_oapg( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ testing composed schemas at inline locations :param skip_deserialization: If true then api_response.response will be set but @@ -575,19 +641,86 @@ class BaseApi(api_client.Api): class InlineComposition(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def inline_composition( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def inline_composition( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def inline_composition( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def inline_composition( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_composition_oapg( body=body, query_params=query_params, @@ -602,19 +735,86 @@ class InlineComposition(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["multipart/form-data"], + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._inline_composition_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py index 69d6a91581..262f5e3a77 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py @@ -121,18 +121,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _json_form_data_oapg( + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_form_data_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_form_data_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ test json serialization of form data :param skip_deserialization: If true then api_response.response will be set but @@ -181,17 +225,62 @@ class BaseApi(api_client.Api): class JsonFormData(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_form_data( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_form_data( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_form_data( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_form_data( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_form_data( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_form_data_oapg( body=body, content_type=content_type, @@ -204,17 +293,62 @@ class JsonFormData(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_form_data_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi index 149f7c6f44..e1ce657827 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi @@ -116,18 +116,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _json_form_data_oapg( + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_form_data_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_form_data_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_form_data_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ test json serialization of form data :param skip_deserialization: If true then api_response.response will be set but @@ -176,17 +220,62 @@ class BaseApi(api_client.Api): class JsonFormData(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_form_data( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_form_data( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_form_data( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_form_data( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_form_data( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_form_data_oapg( body=body, content_type=content_type, @@ -199,17 +288,62 @@ class JsonFormData(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_form_data_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py index 00b8cf4542..d55867cd11 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py @@ -57,18 +57,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _json_patch_oapg( + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_patch_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_patch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_patch_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_patch_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ json patch :param skip_deserialization: If true then api_response.response will be set but @@ -117,17 +161,62 @@ class BaseApi(api_client.Api): class JsonPatch(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_patch( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_patch( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_patch( + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_patch_oapg( body=body, content_type=content_type, @@ -140,17 +229,62 @@ class JsonPatch(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_patch_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi index 923c612395..3322e593cc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi @@ -52,18 +52,62 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _json_patch_oapg( + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_patch_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_patch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_patch_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_patch_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ json patch :param skip_deserialization: If true then api_response.response will be set but @@ -112,17 +156,62 @@ class BaseApi(api_client.Api): class JsonPatch(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_patch( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_patch( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_patch( + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_patch_oapg( body=body, content_type=content_type, @@ -135,17 +224,62 @@ class JsonPatch(BaseApi): class ApiForpatch(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def patch( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json-patch+json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, content_type: str = 'application/json-patch+json', + body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_patch_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py index 9f003807d2..7e075373a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py @@ -65,19 +65,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _json_with_charset_oapg( + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_with_charset_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_with_charset_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_with_charset_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_with_charset_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ json with charset tx and rx :param skip_deserialization: If true then api_response.response will be set but @@ -129,18 +177,67 @@ class BaseApi(api_client.Api): class JsonWithCharset(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_with_charset( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_with_charset( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_with_charset( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_with_charset( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_with_charset( + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_with_charset_oapg( body=body, content_type=content_type, @@ -154,18 +251,67 @@ class JsonWithCharset(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_with_charset_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi index 11df6277dc..5246ee555a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi @@ -60,19 +60,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _json_with_charset_oapg( + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _json_with_charset_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _json_with_charset_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _json_with_charset_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _json_with_charset_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ json with charset tx and rx :param skip_deserialization: If true then api_response.response will be set but @@ -124,18 +172,67 @@ class BaseApi(api_client.Api): class JsonWithCharset(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def json_with_charset( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def json_with_charset( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def json_with_charset( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def json_with_charset( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def json_with_charset( + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_with_charset_oapg( body=body, content_type=content_type, @@ -149,18 +246,67 @@ class JsonWithCharset(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json; charset=utf-8', + body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._json_with_charset_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py index 36d5018988..60e361c9b3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params class MapBeanSchema( @@ -119,17 +119,44 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _object_in_query_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ user list :param skip_deserialization: If true then api_response.response will be set but @@ -178,16 +205,44 @@ class BaseApi(api_client.Api): class ObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def object_in_query( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def object_in_query( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_in_query_oapg( query_params=query_params, stream=stream, @@ -199,16 +254,44 @@ class ObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_in_query_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi index 165300b9b1..f6bcadc02c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi @@ -24,7 +24,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params class MapBeanSchema( @@ -114,17 +114,44 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _object_in_query_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ user list :param skip_deserialization: If true then api_response.response will be set but @@ -173,16 +200,44 @@ class BaseApi(api_client.Api): class ObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def object_in_query( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def object_in_query( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_in_query_oapg( query_params=query_params, stream=stream, @@ -194,16 +249,44 @@ class ObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_in_query_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py index c0c42ad337..4f12ff8fad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -85,7 +85,7 @@ request_query_a_b2 = api_client.QueryParameter( schema=ABSchema, explode=True, ) -# header params +# Header params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema @@ -131,7 +131,7 @@ request_header_a_b4 = api_client.HeaderParameter( style=api_client.ParameterStyle.SIMPLE, schema=ABSchema, ) -# path params +# Path params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -189,7 +189,7 @@ request_path_a_b6 = api_client.PathParameter( schema=ABSchema, required=True, ) -# cookie params +# Cookie params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -285,23 +285,87 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _parameter_collisions_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _parameter_collisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _parameter_collisions_oapg( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ parameter collision case :param skip_deserialization: If true then api_response.response will be set but @@ -402,22 +466,87 @@ class BaseApi(api_client.Api): class ParameterCollisions(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def parameter_collisions( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def parameter_collisions( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def parameter_collisions( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._parameter_collisions_oapg( body=body, query_params=query_params, @@ -435,22 +564,87 @@ class ParameterCollisions(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._parameter_collisions_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi index 15015af7d4..b24853ab38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -83,7 +83,7 @@ request_query_a_b2 = api_client.QueryParameter( schema=ABSchema, explode=True, ) -# header params +# Header params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema @@ -129,7 +129,7 @@ request_header_a_b4 = api_client.HeaderParameter( style=api_client.ParameterStyle.SIMPLE, schema=ABSchema, ) -# path params +# Path params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -187,7 +187,7 @@ request_path_a_b6 = api_client.PathParameter( schema=ABSchema, required=True, ) -# cookie params +# Cookie params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema @@ -280,23 +280,87 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _parameter_collisions_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _parameter_collisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _parameter_collisions_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _parameter_collisions_oapg( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ parameter collision case :param skip_deserialization: If true then api_response.response will be set but @@ -397,22 +461,87 @@ class BaseApi(api_client.Api): class ParameterCollisions(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def parameter_collisions( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def parameter_collisions( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def parameter_collisions( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def parameter_collisions( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._parameter_collisions_oapg( body=body, query_params=query_params, @@ -430,22 +559,87 @@ class ParameterCollisions(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + cookie_params: RequestCookieParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._parameter_collisions_oapg( body=body, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py index ef60c3b93d..d5fb0a61b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py @@ -29,7 +29,7 @@ from petstore_api.model.api_response import ApiResponse from . import path -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -160,20 +160,72 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _upload_file_with_required_file_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _upload_file_with_required_file_oapg( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads an image (required) :param skip_deserialization: If true then api_response.response will be set but @@ -240,19 +292,72 @@ class BaseApi(api_client.Api): class UploadFileWithRequiredFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file_with_required_file( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_file_with_required_file( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_file_with_required_file( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_with_required_file_oapg( body=body, path_params=path_params, @@ -267,19 +372,72 @@ class UploadFileWithRequiredFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_with_required_file_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi index cbb9471b1d..94f430e8bb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.api_response import ApiResponse -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -152,20 +152,72 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _upload_file_with_required_file_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_file_with_required_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _upload_file_with_required_file_oapg( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads an image (required) :param skip_deserialization: If true then api_response.response will be set but @@ -232,19 +284,72 @@ class BaseApi(api_client.Api): class UploadFileWithRequiredFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file_with_required_file( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_file_with_required_file( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_file_with_required_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_file_with_required_file( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_with_required_file_oapg( body=body, path_params=path_params, @@ -259,19 +364,72 @@ class UploadFileWithRequiredFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_with_required_file_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py new file mode 100644 index 0000000000..d6a09bc162 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from petstore_api.paths.fake_query_param_with_json_content_type import Api + +from petstore_api.paths import PathValues + +path = PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py new file mode 100644 index 0000000000..6c26877167 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + +from . import path + +# Query params +SchemaForRequestParameterSomeParamApplicationJson = schemas.AnyTypeSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'someParam': typing.Union[SchemaForRequestParameterSomeParamApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_some_param = api_client.QueryParameter( + name="someParam", + content={ + "application/json": SchemaForRequestParameterSomeParamApplicationJson, + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + query param with json content-type + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_some_param, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response + + +class QueryParamWithJsonContentType(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._query_param_with_json_content_type_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._query_param_with_json_content_type_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi new file mode 100644 index 0000000000..9d042a631f --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi @@ -0,0 +1,280 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + +# Query params +SchemaForRequestParameterSomeParamApplicationJson = schemas.AnyTypeSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'someParam': typing.Union[SchemaForRequestParameterSomeParamApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_some_param = api_client.QueryParameter( + name="someParam", + content={ + "application/json": SchemaForRequestParameterSomeParamApplicationJson, + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _query_param_with_json_content_type_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + query param with json content-type + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_some_param, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response + + +class QueryParamWithJsonContentType(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_param_with_json_content_type( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._query_param_with_json_content_type_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._query_param_with_json_content_type_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py index ae601b1781..adf8895586 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py @@ -28,7 +28,7 @@ from petstore_api.model.foo import Foo from . import path -# query params +# Query params MapBeanSchema = Foo RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', @@ -72,17 +72,44 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _ref_object_in_query_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ user list :param skip_deserialization: If true then api_response.response will be set but @@ -131,16 +158,44 @@ class BaseApi(api_client.Api): class RefObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def ref_object_in_query( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def ref_object_in_query( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._ref_object_in_query_oapg( query_params=query_params, stream=stream, @@ -152,16 +207,44 @@ class RefObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._ref_object_in_query_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi index aaa210087b..8c34a12749 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.foo import Foo -# query params +# Query params MapBeanSchema = Foo RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', @@ -67,17 +67,44 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _ref_object_in_query_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _ref_object_in_query_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ user list :param skip_deserialization: If true then api_response.response will be set but @@ -126,16 +153,44 @@ class BaseApi(api_client.Api): class RefObjectInQuery(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def ref_object_in_query( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def ref_object_in_query( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def ref_object_in_query( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._ref_object_in_query_oapg( query_params=query_params, stream=stream, @@ -147,16 +202,44 @@ class RefObjectInQuery(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._ref_object_in_query_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py index fd14aeb19c..f8ec75ce3e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _array_of_enums_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _array_of_enums_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Array of Enums :param skip_deserialization: If true then api_response.response will be set but @@ -131,18 +179,67 @@ class BaseApi(api_client.Api): class ArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def array_of_enums( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def array_of_enums( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def array_of_enums( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_of_enums_oapg( body=body, content_type=content_type, @@ -156,18 +253,67 @@ class ArrayOfEnums(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_of_enums_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi index a1284f4e2c..ac0fb2920f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _array_of_enums_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _array_of_enums_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _array_of_enums_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _array_of_enums_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Array of Enums :param skip_deserialization: If true then api_response.response will be set but @@ -126,18 +174,67 @@ class BaseApi(api_client.Api): class ArrayOfEnums(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def array_of_enums( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def array_of_enums( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def array_of_enums( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def array_of_enums( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_of_enums_oapg( body=body, content_type=content_type, @@ -151,18 +248,67 @@ class ArrayOfEnums(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_of_enums_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py index 69be2acbc8..cebbb40e5f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _array_model_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _array_model_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _array_model_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _array_model_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _array_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class ArrayModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def array_model( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def array_model( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def array_model( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def array_model( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def array_model( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_model_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class ArrayModel(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_model_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi index d6f2401787..ed802fd8c6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _array_model_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _array_model_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _array_model_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _array_model_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _array_model_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -125,18 +173,67 @@ class BaseApi(api_client.Api): class ArrayModel(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def array_model( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def array_model( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def array_model( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def array_model( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def array_model( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_model_oapg( body=body, content_type=content_type, @@ -150,18 +247,67 @@ class ArrayModel(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._array_model_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py index 4341a21a72..6eee57e2c6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py @@ -65,19 +65,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _boolean_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _boolean_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _boolean_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _boolean_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _boolean_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -128,18 +176,67 @@ class BaseApi(api_client.Api): class Boolean(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def boolean( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def boolean( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def boolean( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def boolean( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def boolean( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._boolean_oapg( body=body, content_type=content_type, @@ -153,18 +250,67 @@ class Boolean(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._boolean_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi index 4cfdba5afd..7a975a27bc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi @@ -60,19 +60,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _boolean_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _boolean_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _boolean_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _boolean_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _boolean_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -123,18 +171,67 @@ class BaseApi(api_client.Api): class Boolean(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def boolean( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def boolean( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def boolean( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def boolean( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def boolean( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._boolean_oapg( body=body, content_type=content_type, @@ -148,18 +245,67 @@ class Boolean(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._boolean_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py index 8a5362d3cf..84acaf1702 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _composed_one_of_different_types_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class ComposedOneOfDifferentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def composed_one_of_different_types( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def composed_one_of_different_types( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def composed_one_of_different_types( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def composed_one_of_different_types( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def composed_one_of_different_types( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._composed_one_of_different_types_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class ComposedOneOfDifferentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._composed_one_of_different_types_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi index 6c39781565..30d5f91dba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _composed_one_of_different_types_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _composed_one_of_different_types_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -125,18 +173,67 @@ class BaseApi(api_client.Api): class ComposedOneOfDifferentTypes(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def composed_one_of_different_types( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def composed_one_of_different_types( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def composed_one_of_different_types( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def composed_one_of_different_types( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def composed_one_of_different_types( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._composed_one_of_different_types_oapg( body=body, content_type=content_type, @@ -150,18 +247,67 @@ class ComposedOneOfDifferentTypes(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._composed_one_of_different_types_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py index e7ea25ea04..4b953d0500 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _string_enum_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _string_enum_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _string_enum_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _string_enum_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _string_enum_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class StringEnum(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def string_enum( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def string_enum( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def string_enum( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def string_enum( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def string_enum( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_enum_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class StringEnum(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_enum_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi index 0d6d1861a1..ea4b1fe2ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _string_enum_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _string_enum_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _string_enum_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _string_enum_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _string_enum_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -125,18 +173,67 @@ class BaseApi(api_client.Api): class StringEnum(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def string_enum( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def string_enum( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def string_enum( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def string_enum( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def string_enum( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_enum_oapg( body=body, content_type=content_type, @@ -150,18 +247,67 @@ class StringEnum(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_enum_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py index 4154902886..dfeb527472 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py @@ -68,19 +68,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _mammal_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -133,18 +181,67 @@ class BaseApi(api_client.Api): class Mammal(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def mammal( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._mammal_oapg( body=body, content_type=content_type, @@ -158,18 +255,67 @@ class Mammal(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._mammal_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi index 801386b9be..24137e6fa5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi @@ -63,19 +63,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mammal_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _mammal_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -128,18 +176,67 @@ class BaseApi(api_client.Api): class Mammal(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def mammal( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mammal( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._mammal_oapg( body=body, content_type=content_type, @@ -153,18 +250,67 @@ class Mammal(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._mammal_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py index 4ff581fd00..ab8e5088e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _number_with_validations_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _number_with_validations_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _number_with_validations_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _number_with_validations_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _number_with_validations_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class NumberWithValidations(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def number_with_validations( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def number_with_validations( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def number_with_validations( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def number_with_validations( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def number_with_validations( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._number_with_validations_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class NumberWithValidations(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._number_with_validations_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi index 219cf0af99..8fb5defd56 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _number_with_validations_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _number_with_validations_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _number_with_validations_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _number_with_validations_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _number_with_validations_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -125,18 +173,67 @@ class BaseApi(api_client.Api): class NumberWithValidations(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def number_with_validations( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def number_with_validations( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def number_with_validations( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def number_with_validations( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def number_with_validations( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._number_with_validations_oapg( body=body, content_type=content_type, @@ -150,18 +247,67 @@ class NumberWithValidations(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._number_with_validations_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py index bff2bd9a94..9df4ea7f15 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py @@ -67,19 +67,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _object_model_with_ref_props_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -130,18 +178,67 @@ class BaseApi(api_client.Api): class ObjectModelWithRefProps(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def object_model_with_ref_props( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def object_model_with_ref_props( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def object_model_with_ref_props( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def object_model_with_ref_props( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def object_model_with_ref_props( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_model_with_ref_props_oapg( body=body, content_type=content_type, @@ -155,18 +252,67 @@ class ObjectModelWithRefProps(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_model_with_ref_props_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi index 89ca594ad0..7ad3021226 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi @@ -62,19 +62,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _object_model_with_ref_props_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _object_model_with_ref_props_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -125,18 +173,67 @@ class BaseApi(api_client.Api): class ObjectModelWithRefProps(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def object_model_with_ref_props( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def object_model_with_ref_props( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def object_model_with_ref_props( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def object_model_with_ref_props( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def object_model_with_ref_props( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_model_with_ref_props_oapg( body=body, content_type=content_type, @@ -150,18 +247,67 @@ class ObjectModelWithRefProps(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._object_model_with_ref_props_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py index 6e990df9cd..6e12c6a77c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py @@ -65,19 +65,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _string_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _string_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _string_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _string_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _string_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -128,18 +176,67 @@ class BaseApi(api_client.Api): class String(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def string( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def string( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def string( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def string( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def string( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_oapg( body=body, content_type=content_type, @@ -153,18 +250,67 @@ class String(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi index ca6f8226e0..0e7d1fb36c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi @@ -60,19 +60,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _string_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _string_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _string_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _string_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _string_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -123,18 +171,67 @@ class BaseApi(api_client.Api): class String(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def string( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def string( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def string( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def string( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def string( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_oapg( body=body, content_type=content_type, @@ -148,18 +245,67 @@ class String(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._string_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py index cfa2be9bec..f286d0d05a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py @@ -56,17 +56,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _response_without_schema_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ receives a response without schema :param skip_deserialization: If true then api_response.response will be set but @@ -107,16 +134,44 @@ class BaseApi(api_client.Api): class ResponseWithoutSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def response_without_schema( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def response_without_schema( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._response_without_schema_oapg( accept_content_types=accept_content_types, stream=stream, @@ -128,16 +183,44 @@ class ResponseWithoutSchema(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._response_without_schema_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi index feeb025419..e562a50173 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi @@ -51,17 +51,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _response_without_schema_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _response_without_schema_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ receives a response without schema :param skip_deserialization: If true then api_response.response will be set but @@ -102,16 +129,44 @@ class BaseApi(api_client.Api): class ResponseWithoutSchema(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def response_without_schema( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def response_without_schema( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def response_without_schema( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._response_without_schema_oapg( accept_content_types=accept_content_types, stream=stream, @@ -123,16 +178,44 @@ class ResponseWithoutSchema(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._response_without_schema_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py index af5cb28dd1..760ceea2ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py @@ -28,7 +28,7 @@ from petstore_api.model.string_with_validation import StringWithValidation from . import path -# query params +# Query params class PipeSchema( @@ -225,17 +225,44 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _query_parameter_collection_format_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -288,16 +315,44 @@ class BaseApi(api_client.Api): class QueryParameterCollectionFormat(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def query_parameter_collection_format( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_parameter_collection_format( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._query_parameter_collection_format_oapg( query_params=query_params, stream=stream, @@ -309,16 +364,44 @@ class QueryParameterCollectionFormat(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._query_parameter_collection_format_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi index b91a6db442..7923932d13 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.string_with_validation import StringWithValidation -# query params +# Query params class PipeSchema( @@ -220,17 +220,44 @@ _response_for_200 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _query_parameter_collection_format_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _query_parameter_collection_format_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -283,16 +310,44 @@ class BaseApi(api_client.Api): class QueryParameterCollectionFormat(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def query_parameter_collection_format( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def query_parameter_collection_format( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def query_parameter_collection_format( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._query_parameter_collection_format_oapg( query_params=query_params, stream=stream, @@ -304,16 +359,44 @@ class QueryParameterCollectionFormat(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, query_params: RequestQueryParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._query_parameter_collection_format_oapg( query_params=query_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py index c705235d88..9686e6ede5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py @@ -66,19 +66,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_download_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads a file and downloads a file using application/octet-stream :param skip_deserialization: If true then api_response.response will be set but @@ -132,18 +180,67 @@ class BaseApi(api_client.Api): class UploadDownloadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_download_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_download_file_oapg( body=body, content_type=content_type, @@ -157,18 +254,67 @@ class UploadDownloadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_download_file_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi index 227bdc715f..a6086fbd0d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi @@ -61,19 +61,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_download_file_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_download_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads a file and downloads a file using application/octet-stream :param skip_deserialization: If true then api_response.response will be set but @@ -127,18 +175,67 @@ class BaseApi(api_client.Api): class UploadDownloadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_download_file( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_download_file( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_download_file_oapg( body=body, content_type=content_type, @@ -152,18 +249,67 @@ class UploadDownloadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream, bytes, io.FileIO, io.BufferedReader, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: typing_extensions.Literal["application/octet-stream"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], content_type: str = 'application/octet-stream', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_download_file_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py index 90d7d406eb..867654e95f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py @@ -131,19 +131,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_file_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_file_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads a file using multipart/form-data :param skip_deserialization: If true then api_response.response will be set but @@ -195,18 +243,67 @@ class BaseApi(api_client.Api): class UploadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_file( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_file( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_oapg( body=body, content_type=content_type, @@ -220,18 +317,67 @@ class UploadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi index f98b2114af..c77969fbf7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi @@ -126,19 +126,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_file_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_file_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_file_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_file_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads a file using multipart/form-data :param skip_deserialization: If true then api_response.response will be set but @@ -190,18 +238,67 @@ class BaseApi(api_client.Api): class UploadFile(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_file( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_file( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_file( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_file( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_oapg( body=body, content_type=content_type, @@ -215,18 +312,67 @@ class UploadFile(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_file_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py index 561b9840e8..4284b0119c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py @@ -138,19 +138,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_files_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_files_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_files_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads files using multipart/form-data :param skip_deserialization: If true then api_response.response will be set but @@ -202,18 +250,67 @@ class BaseApi(api_client.Api): class UploadFiles(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_files( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_files( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_files( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_files_oapg( body=body, content_type=content_type, @@ -227,18 +324,67 @@ class UploadFiles(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_files_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi index e39f47562b..2b1e1f508f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi @@ -133,19 +133,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _upload_files_oapg( + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_files_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_files_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _upload_files_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads files using multipart/form-data :param skip_deserialization: If true then api_response.response will be set but @@ -197,18 +245,67 @@ class BaseApi(api_client.Api): class UploadFiles(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_files( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_files( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_files( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_files( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_files_oapg( body=body, content_type=content_type, @@ -222,18 +319,67 @@ class UploadFiles(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_files_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py index a396adbc02..bde734e758 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py @@ -109,17 +109,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _foo_get_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -163,16 +190,44 @@ class BaseApi(api_client.Api): class FooGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def foo_get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def foo_get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._foo_get_oapg( accept_content_types=accept_content_types, stream=stream, @@ -184,16 +239,44 @@ class FooGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._foo_get_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi index 8576cd5c0d..4c5f088f78 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi @@ -104,17 +104,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _foo_get_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _foo_get_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema @@ -158,16 +185,44 @@ class BaseApi(api_client.Api): class FooGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def foo_get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def foo_get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def foo_get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._foo_get_oapg( accept_content_types=accept_content_types, stream=stream, @@ -179,16 +234,44 @@ class FooGet(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._foo_get_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py index d944d243b5..eab76eab72 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py @@ -88,19 +88,80 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _add_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Add a new pet to the store :param skip_deserialization: If true then api_response.response will be set but @@ -155,18 +216,80 @@ class BaseApi(api_client.Api): class AddPet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def add_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._add_pet_oapg( body=body, content_type=content_type, @@ -180,18 +303,80 @@ class AddPet(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._add_pet_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi index b9d31131b7..844a49f709 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi @@ -68,19 +68,80 @@ _response_for_405 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _add_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Add a new pet to the store :param skip_deserialization: If true then api_response.response will be set but @@ -135,18 +196,80 @@ class BaseApi(api_client.Api): class AddPet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def add_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._add_pet_oapg( body=body, content_type=content_type, @@ -160,18 +283,80 @@ class AddPet(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._add_pet_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py index 8658e89bdc..455320b56c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py @@ -101,18 +101,70 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Update an existing pet :param skip_deserialization: If true then api_response.response will be set but @@ -167,17 +219,70 @@ class BaseApi(api_client.Api): class UpdatePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_oapg( body=body, content_type=content_type, @@ -191,17 +296,70 @@ class UpdatePet(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi index b2dea8e666..925cf09510 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi @@ -80,18 +80,70 @@ _response_for_405 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_pet_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Update an existing pet :param skip_deserialization: If true then api_response.response will be set but @@ -146,17 +198,70 @@ class BaseApi(api_client.Api): class UpdatePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_pet( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_pet( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_oapg( body=body, content_type=content_type, @@ -170,17 +275,70 @@ class UpdatePet(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXml,], + content_type: typing_extensions.Literal["application/xml"], + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], + content_type: str = ..., + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], content_type: str = 'application/json', host_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py index b8b945f54f..bca423ad68 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py @@ -29,7 +29,7 @@ from petstore_api.model.pet import Pet from . import path -# query params +# Query params class StatusSchema( @@ -202,18 +202,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _find_pets_by_status_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Finds Pets by status :param skip_deserialization: If true then api_response.response will be set but @@ -269,17 +299,48 @@ class BaseApi(api_client.Api): class FindPetsByStatus(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def find_pets_by_status( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_status( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_status_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -292,17 +353,48 @@ class FindPetsByStatus(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_status_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi index d02d486738..e19a803673 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.pet import Pet -# query params +# Query params class StatusSchema( @@ -184,18 +184,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_pets_by_status_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _find_pets_by_status_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Finds Pets by status :param skip_deserialization: If true then api_response.response will be set but @@ -251,17 +281,48 @@ class BaseApi(api_client.Api): class FindPetsByStatus(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def find_pets_by_status( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_pets_by_status( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_status( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_status_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -274,17 +335,48 @@ class FindPetsByStatus(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_status_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py index 03b395a6da..982aeb15c2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py @@ -29,7 +29,7 @@ from petstore_api.model.pet import Pet from . import path -# query params +# Query params class TagsSchema( @@ -177,18 +177,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _find_pets_by_tags_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Finds Pets by tags :param skip_deserialization: If true then api_response.response will be set but @@ -244,17 +274,48 @@ class BaseApi(api_client.Api): class FindPetsByTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def find_pets_by_tags( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_tags( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_tags_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -267,17 +328,48 @@ class FindPetsByTags(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_tags_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi index a56a42656f..c48153b2ff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.pet import Pet -# query params +# Query params class TagsSchema( @@ -167,18 +167,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_pets_by_tags_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _find_pets_by_tags_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Finds Pets by tags :param skip_deserialization: If true then api_response.response will be set but @@ -234,17 +264,48 @@ class BaseApi(api_client.Api): class FindPetsByTags(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def find_pets_by_tags( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_pets_by_tags( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_pets_by_tags( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_tags_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -257,17 +318,48 @@ class FindPetsByTags(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._find_pets_by_tags_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py index 83c429bdea..ae048dfccc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# header params +# Header params ApiKeySchema = schemas.StrSchema RequestRequiredHeaderParams = typing_extensions.TypedDict( 'RequestRequiredHeaderParams', @@ -52,7 +52,7 @@ request_header_api_key = api_client.HeaderParameter( style=api_client.ParameterStyle.SIMPLE, schema=ApiKeySchema, ) -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -99,17 +99,44 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_pet_oapg( - self: api_client.Api, + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Deletes a pet :param skip_deserialization: If true then api_response.response will be set but @@ -171,16 +198,44 @@ class BaseApi(api_client.Api): class DeletePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_pet( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_pet( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_pet_oapg( header_params=header_params, path_params=path_params, @@ -193,16 +248,44 @@ class DeletePet(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_pet_oapg( header_params=header_params, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi index 30334cd163..2a56be3473 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# header params +# Header params ApiKeySchema = schemas.StrSchema RequestRequiredHeaderParams = typing_extensions.TypedDict( 'RequestRequiredHeaderParams', @@ -50,7 +50,7 @@ request_header_api_key = api_client.HeaderParameter( style=api_client.ParameterStyle.SIMPLE, schema=ApiKeySchema, ) -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -91,17 +91,44 @@ _response_for_400 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_pet_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_pet_oapg( - self: api_client.Api, + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Deletes a pet :param skip_deserialization: If true then api_response.response will be set but @@ -163,16 +190,44 @@ class BaseApi(api_client.Api): class DeletePet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_pet( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_pet( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_pet( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_pet_oapg( header_params=header_params, path_params=path_params, @@ -185,16 +240,44 @@ class DeletePet(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_pet_oapg( header_params=header_params, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py index 2309680029..b170ee4485 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py @@ -29,7 +29,7 @@ from petstore_api.model.pet import Pet from . import path -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -117,18 +117,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_pet_by_id_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Find pet by ID :param skip_deserialization: If true then api_response.response will be set but @@ -184,17 +214,48 @@ class BaseApi(api_client.Api): class GetPetById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_pet_by_id( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_pet_by_id( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_pet_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -207,17 +268,48 @@ class GetPetById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_pet_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi index 9dde67351a..4ed83baee2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.pet import Pet -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -107,18 +107,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_pet_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_pet_by_id_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Find pet by ID :param skip_deserialization: If true then api_response.response will be set but @@ -174,17 +204,48 @@ class BaseApi(api_client.Api): class GetPetById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_pet_by_id( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_pet_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_pet_by_id( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_pet_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -197,17 +258,48 @@ class GetPetById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_pet_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py index 76250ba9b3..101ac83216 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -143,18 +143,60 @@ _status_code_to_response = { class BaseApi(api_client.Api): - + @typing.overload def _update_pet_with_form_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_pet_with_form_oapg( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Updates a pet in the store with form data :param skip_deserialization: If true then api_response.response will be set but @@ -218,17 +260,60 @@ class BaseApi(api_client.Api): class UpdatePetWithForm(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_pet_with_form( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet_with_form( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_pet_with_form( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_with_form_oapg( body=body, path_params=path_params, @@ -242,17 +327,60 @@ class UpdatePetWithForm(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_with_form_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi index 9c1f2854e9..f2be056a38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -135,18 +135,60 @@ _response_for_405 = api_client.OpenApiResponse( class BaseApi(api_client.Api): - + @typing.overload def _update_pet_with_form_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet_with_form_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_pet_with_form_oapg( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Updates a pet in the store with form data :param skip_deserialization: If true then api_response.response will be set but @@ -210,17 +252,60 @@ class BaseApi(api_client.Api): class UpdatePetWithForm(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_pet_with_form( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet_with_form( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_pet_with_form( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_pet_with_form( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_with_form_oapg( body=body, path_params=path_params, @@ -234,17 +319,60 @@ class UpdatePetWithForm(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'application/x-www-form-urlencoded', + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_pet_with_form_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py index 432d558606..196f0beccf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py @@ -29,7 +29,7 @@ from petstore_api.model.api_response import ApiResponse from . import path -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -155,20 +155,72 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _upload_image_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_image_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _upload_image_oapg( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads an image :param skip_deserialization: If true then api_response.response will be set but @@ -235,19 +287,72 @@ class BaseApi(api_client.Api): class UploadImage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_image( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_image( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_image( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_image_oapg( body=body, path_params=path_params, @@ -262,19 +367,72 @@ class UploadImage(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_image_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi index 9e8f9e23d3..84c05ddf6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.api_response import ApiResponse -# path params +# Path params PetIdSchema = schemas.Int64Schema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -147,20 +147,72 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): - + @typing.overload def _upload_image_oapg( - self: api_client.Api, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _upload_image_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _upload_image_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _upload_image_oapg( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ uploads an image :param skip_deserialization: If true then api_response.response will be set but @@ -227,19 +279,72 @@ class BaseApi(api_client.Api): class UploadImage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def upload_image( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def upload_image( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def upload_image( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def upload_image( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_image_oapg( body=body, path_params=path_params, @@ -254,19 +359,72 @@ class UploadImage(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, + self, + content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, content_type: str = 'multipart/form-data', + body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._upload_image_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py index 794c49c9f2..4f9f0eb1f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py @@ -86,17 +86,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_inventory_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Returns pet inventories by status :param skip_deserialization: If true then api_response.response will be set but @@ -138,16 +165,44 @@ class BaseApi(api_client.Api): class GetInventory(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_inventory( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_inventory( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_inventory_oapg( accept_content_types=accept_content_types, stream=stream, @@ -159,16 +214,44 @@ class GetInventory(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_inventory_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi index 01abe22ddb..30d769a9d3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi @@ -78,17 +78,44 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_inventory_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_inventory_oapg( - self: api_client.Api, + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Returns pet inventories by status :param skip_deserialization: If true then api_response.response will be set but @@ -130,16 +157,44 @@ class BaseApi(api_client.Api): class GetInventory(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_inventory( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_inventory( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_inventory( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_inventory_oapg( accept_content_types=accept_content_types, stream=stream, @@ -151,16 +206,44 @@ class GetInventory(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_inventory_oapg( accept_content_types=accept_content_types, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py index aba51cba12..a92da10efb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py @@ -86,19 +86,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _place_order_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Place an order for a pet :param skip_deserialization: If true then api_response.response will be set but @@ -152,18 +200,67 @@ class BaseApi(api_client.Api): class PlaceOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def place_order( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._place_order_oapg( body=body, content_type=content_type, @@ -177,18 +274,67 @@ class PlaceOrder(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._place_order_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi index 9950816d21..20ad57939b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi @@ -80,19 +80,67 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _place_order_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _place_order_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Place an order for a pet :param skip_deserialization: If true then api_response.response will be set but @@ -146,18 +194,67 @@ class BaseApi(api_client.Api): class PlaceOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def place_order( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def place_order( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._place_order_oapg( body=body, content_type=content_type, @@ -171,18 +268,67 @@ class PlaceOrder(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._place_order_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py index 05b16de6cb..65f49c91e4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# path params +# Path params OrderIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -83,16 +83,40 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_order_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete purchase order by ID :param skip_deserialization: If true then api_response.response will be set but @@ -141,15 +165,40 @@ class BaseApi(api_client.Api): class DeleteOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_order( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_order( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_order_oapg( path_params=path_params, stream=stream, @@ -161,15 +210,40 @@ class DeleteOrder(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_order_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi index 9cbad562ba..74af6d4a61 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi @@ -24,7 +24,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# path params +# Path params OrderIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -77,16 +77,40 @@ _response_for_404 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_order_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_order_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete purchase order by ID :param skip_deserialization: If true then api_response.response will be set but @@ -135,15 +159,40 @@ class BaseApi(api_client.Api): class DeleteOrder(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_order( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_order( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_order( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_order_oapg( path_params=path_params, stream=stream, @@ -155,15 +204,40 @@ class DeleteOrder(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_order_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py index cae807ed63..9c920df2a9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py @@ -29,7 +29,7 @@ from petstore_api.model.order import Order from . import path -# path params +# Path params class OrderIdSchema( @@ -124,18 +124,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_order_by_id_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Find purchase order by ID :param skip_deserialization: If true then api_response.response will be set but @@ -190,17 +220,48 @@ class BaseApi(api_client.Api): class GetOrderById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_order_by_id( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_order_by_id( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_order_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -213,17 +274,48 @@ class GetOrderById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_order_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi index 46d74645bb..a421c4ab4a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.order import Order -# path params +# Path params class OrderIdSchema( @@ -112,18 +112,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_order_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_order_by_id_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Find purchase order by ID :param skip_deserialization: If true then api_response.response will be set but @@ -178,17 +208,48 @@ class BaseApi(api_client.Api): class GetOrderById(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_order_by_id( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_order_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_order_by_id( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_order_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -201,17 +262,48 @@ class GetOrderById(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_order_by_id_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py index 4dd2c94c16..08cfcc902c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py @@ -58,18 +58,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Create user :param skip_deserialization: If true then api_response.response will be set but @@ -124,17 +168,62 @@ class BaseApi(api_client.Api): class CreateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_user_oapg( body=body, content_type=content_type, @@ -147,17 +236,62 @@ class CreateUser(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_user_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi index bffc191bc7..df85a246c2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi @@ -53,18 +53,62 @@ _response_for_default = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Create user :param skip_deserialization: If true then api_response.response will be set but @@ -119,17 +163,62 @@ class BaseApi(api_client.Api): class CreateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_user_oapg( body=body, content_type=content_type, @@ -142,17 +231,62 @@ class CreateUser(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_user_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py index 35e44ef1d4..d596822b47 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py @@ -83,18 +83,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_users_with_array_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Creates list of users with given input array :param skip_deserialization: If true then api_response.response will be set but @@ -149,17 +193,62 @@ class BaseApi(api_client.Api): class CreateUsersWithArrayInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_users_with_array_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_array_input_oapg( body=body, content_type=content_type, @@ -172,17 +261,62 @@ class CreateUsersWithArrayInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_array_input_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi index 73b8aaaa73..6c83bb4f8b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi @@ -78,18 +78,62 @@ _response_for_default = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_users_with_array_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_users_with_array_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Creates list of users with given input array :param skip_deserialization: If true then api_response.response will be set but @@ -144,17 +188,62 @@ class BaseApi(api_client.Api): class CreateUsersWithArrayInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_users_with_array_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_users_with_array_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_array_input_oapg( body=body, content_type=content_type, @@ -167,17 +256,62 @@ class CreateUsersWithArrayInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_array_input_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py index 491da3305b..fd0fe46f1b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py @@ -83,18 +83,62 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_users_with_list_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Creates list of users with given input array :param skip_deserialization: If true then api_response.response will be set but @@ -149,17 +193,62 @@ class BaseApi(api_client.Api): class CreateUsersWithListInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_users_with_list_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_list_input_oapg( body=body, content_type=content_type, @@ -172,17 +261,62 @@ class CreateUsersWithListInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_list_input_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi index 84101eb41e..ef9c94f622 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi @@ -78,18 +78,62 @@ _response_for_default = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_users_with_list_input_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_users_with_list_input_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Creates list of users with given input array :param skip_deserialization: If true then api_response.response will be set but @@ -144,17 +188,62 @@ class BaseApi(api_client.Api): class CreateUsersWithListInput(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def create_users_with_list_input( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_users_with_list_input( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_list_input_oapg( body=body, content_type=content_type, @@ -167,17 +256,62 @@ class CreateUsersWithListInput(BaseApi): class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def post( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], content_type: str = 'application/json', stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._create_users_with_list_input_oapg( body=body, content_type=content_type, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py index 0e913fbb36..acbe1ccb1d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# query params +# Query params UsernameSchema = schemas.StrSchema PasswordSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( @@ -132,18 +132,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _login_user_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Logs user into the system :param skip_deserialization: If true then api_response.response will be set but @@ -199,17 +229,48 @@ class BaseApi(api_client.Api): class LoginUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def login_user( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def login_user( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._login_user_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -222,17 +283,48 @@ class LoginUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._login_user_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi index b7576e01e9..651fb8afc4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# query params +# Query params UsernameSchema = schemas.StrSchema PasswordSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( @@ -116,18 +116,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _login_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _login_user_oapg( - self: api_client.Api, + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Logs user into the system :param skip_deserialization: If true then api_response.response will be set but @@ -183,17 +213,48 @@ class BaseApi(api_client.Api): class LoginUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def login_user( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def login_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def login_user( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._login_user_oapg( query_params=query_params, accept_content_types=accept_content_types, @@ -206,17 +267,48 @@ class LoginUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._login_user_oapg( query_params=query_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py index e9b8bf377e..085a4ba675 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py @@ -44,16 +44,40 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _logout_user_oapg( - self: api_client.Api, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Logs out current logged in user session :param skip_deserialization: If true then api_response.response will be set but @@ -92,15 +116,40 @@ class BaseApi(api_client.Api): class LogoutUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def logout_user( - self: BaseApi, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def logout_user( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._logout_user_oapg( stream=stream, timeout=timeout, @@ -111,15 +160,40 @@ class LogoutUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._logout_user_oapg( stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi index 0101a5a6d6..52192b6406 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi @@ -39,16 +39,40 @@ _response_for_default = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _logout_user_oapg( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _logout_user_oapg( - self: api_client.Api, + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Logs out current logged in user session :param skip_deserialization: If true then api_response.response will be set but @@ -87,15 +111,40 @@ class BaseApi(api_client.Api): class LogoutUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def logout_user( - self: BaseApi, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def logout_user( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def logout_user( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._logout_user_oapg( stream=stream, timeout=timeout, @@ -106,15 +155,40 @@ class LogoutUser(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._logout_user_oapg( stream=stream, timeout=timeout, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py index c78b157c12..1fbeabb724 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py @@ -26,7 +26,7 @@ from petstore_api import schemas # noqa: F401 from . import path -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -55,14 +55,14 @@ request_path_username = api_client.PathParameter( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -77,22 +77,50 @@ _response_for_404 = api_client.OpenApiResponse( response_cls=ApiResponseFor404, ) _status_code_to_response = { - '400': _response_for_400, + '200': _response_for_200, '404': _response_for_404, } class BaseApi(api_client.Api): + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_user_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete user :param skip_deserialization: If true then api_response.response will be set but @@ -141,15 +169,44 @@ class BaseApi(api_client.Api): class DeleteUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_user( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_user( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_user_oapg( path_params=path_params, stream=stream, @@ -161,15 +218,44 @@ class DeleteUser(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_user_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi index ba971087eb..3bc4ec391e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi @@ -24,7 +24,7 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -53,14 +53,14 @@ request_path_username = api_client.PathParameter( @dataclass -class ApiResponseFor400(api_client.ApiResponse): +class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, ) @@ -77,16 +77,44 @@ _response_for_404 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_user_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Delete user :param skip_deserialization: If true then api_response.response will be set but @@ -135,15 +163,44 @@ class BaseApi(api_client.Api): class DeleteUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def delete_user( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_user( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_user_oapg( path_params=path_params, stream=stream, @@ -155,15 +212,44 @@ class DeleteUser(BaseApi): class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def delete( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._delete_user_oapg( path_params=path_params, stream=stream, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py index ffb005b23e..a75bc873e1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py @@ -29,7 +29,7 @@ from petstore_api.model.user import User from . import path -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -114,18 +114,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_user_by_name_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Get user by user name :param skip_deserialization: If true then api_response.response will be set but @@ -180,17 +210,48 @@ class BaseApi(api_client.Api): class GetUserByName(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_user_by_name( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user_by_name( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_user_by_name_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -203,17 +264,48 @@ class GetUserByName(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_user_by_name_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi index a55ad82c54..60b333602a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.user import User -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -107,18 +107,48 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_by_name_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_user_by_name_oapg( - self: api_client.Api, + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Get user by user name :param skip_deserialization: If true then api_response.response will be set but @@ -173,17 +203,48 @@ class BaseApi(api_client.Api): class GetUserByName(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def get_user_by_name( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user_by_name( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user_by_name( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_user_by_name_oapg( path_params=path_params, accept_content_types=accept_content_types, @@ -196,17 +257,48 @@ class GetUserByName(BaseApi): class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def get( - self: BaseApi, + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._get_user_by_name_oapg( path_params=path_params, accept_content_types=accept_content_types, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py index b9060cb6e7..5a5445aff9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py @@ -29,7 +29,7 @@ from petstore_api.model.user import User from . import path -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -97,18 +97,60 @@ _status_code_to_response = { class BaseApi(api_client.Api): + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], - path_params: RequestPathParams = frozendict.frozendict(), + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Updated user :param skip_deserialization: If true then api_response.response will be set but @@ -173,17 +215,60 @@ class BaseApi(api_client.Api): class UpdateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_user_oapg( body=body, path_params=path_params, @@ -197,17 +282,60 @@ class UpdateUser(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_user_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi index ae9a162e0b..864e5bfac3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi @@ -27,7 +27,7 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.user import User -# path params +# Path params UsernameSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', @@ -91,18 +91,60 @@ _response_for_404 = api_client.OpenApiResponse( class BaseApi(api_client.Api): + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_user_oapg( - self: api_client.Api, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], - path_params: RequestPathParams = frozendict.frozendict(), + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): """ Updated user :param skip_deserialization: If true then api_response.response will be set but @@ -167,17 +209,60 @@ class BaseApi(api_client.Api): class UpdateUser(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names + @typing.overload def update_user( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_user_oapg( body=body, path_params=path_params, @@ -191,17 +276,60 @@ class UpdateUser(BaseApi): class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names + @typing.overload def put( - self: BaseApi, - body: typing.Union[SchemaForRequestBodyApplicationJson, ], + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization - ]: + ): return self._update_user_oapg( body=body, path_params=path_params, diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt index c9227e58a1..342f6630cb 100644 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ b/samples/openapi3/client/petstore/python/requirements.txt @@ -1,5 +1,8 @@ -certifi >= 14.05.14 -frozendict >= 2.0.3 -python_dateutil >= 2.5.3 +certifi >= 14.5.14 +frozendict ~= 2.3.4 +pem >= 19.3.0 +pycryptodome >= 3.9.0 +python-dateutil ~= 2.7.0 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +typing_extensions ~= 4.3.0 +urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py index 2acc6c1cf2..992aa9853b 100644 --- a/samples/openapi3/client/petstore/python/setup.py +++ b/samples/openapi3/client/petstore/python/setup.py @@ -21,13 +21,14 @@ VERSION = "1.0.0" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.15", - "certifi", - "python-dateutil", - "frozendict >= 2.0.3", - "pem>=19.3.0", - "pycryptodome>=3.9.0", - "typing_extensions", + "certifi >= 14.5.14", + "frozendict ~= 2.3.4", + "pem >= 19.3.0", + "pycryptodome >= 3.9.0", + "python-dateutil ~= 2.7.0", + "setuptools >= 21.0.0", + "typing_extensions ~= 4.3.0", + "urllib3 ~= 1.26.7", ] setup( diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py index e36d03aabc..c22a985325 100644 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py @@ -32,7 +32,7 @@ class TestFake(ApiTestMixin, unittest.TestCase): def tearDown(self): pass - response_status = 400 + response_status = 200 response_body = '' diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py index f837d7deb2..f5ec3b7346 100644 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py @@ -32,7 +32,7 @@ class TestFake(ApiTestMixin, unittest.TestCase): def tearDown(self): pass - response_status = 400 + response_status = 200 response_body = '' diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py index ed46831cc9..714554981c 100644 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py @@ -32,7 +32,7 @@ class TestFake(ApiTestMixin, unittest.TestCase): def tearDown(self): pass - response_status = 400 + response_status = 200 response_body = '' diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py new file mode 100644 index 0000000000..fe890aad78 --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import petstore_api +from petstore_api.paths.fake_query_param_with_json_content_type import get # noqa: E501 +from petstore_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestFakeQueryParamWithJsonContentType(ApiTestMixin, unittest.TestCase): + """ + FakeQueryParamWithJsonContentType unit test stubs + query param with json content-type # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py index 87510c338a..4ea2cc0f52 100644 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py @@ -32,7 +32,7 @@ class TestUserUsername(ApiTestMixin, unittest.TestCase): def tearDown(self): pass - response_status = 400 + response_status = 200 response_body = '' diff --git a/samples/openapi3/client/petstore/python/tests_manual/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/__init__.py index 07334894aa..6aabd3fc7f 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/__init__.py +++ b/samples/openapi3/client/petstore/python/tests_manual/__init__.py @@ -1,3 +1,4 @@ +import collections import json import typing import unittest @@ -7,6 +8,8 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client +ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization explode', defaults=[False]) + class ApiTestMixin(unittest.TestCase): json_content_type = 'application/json' diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py index 4c2132ae3d..7ce4a60e8f 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py @@ -778,7 +778,7 @@ class TestFakeApi(ApiTestMixin): ) ] ) - api_response = self.api.json_patch(body) + api_response = self.api.json_patch(body=body) json_body = [ { 'op': 'add', diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py b/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py index f0e73cf61c..75ece111b8 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py @@ -13,7 +13,7 @@ import collections from petstore_api import api_client, exceptions, schemas -ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization explode', defaults=[False]) +from . import ParamTestCase class TestParameter(unittest.TestCase): @@ -930,7 +930,7 @@ class TestParameter(unittest.TestCase): content={'application/json': schemas.AnyTypeSchema} ) - def test_content_json_serialization(self): + def test_header_content_json_serialization(self): name = 'color' test_cases = ( ParamTestCase( @@ -990,6 +990,66 @@ class TestParameter(unittest.TestCase): serialization = parameter.serialize(test_case.payload) self.assertEqual(serialization, test_case.expected_serialization) + def test_query_content_json_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + {'color': '?color=null'} + ), + ParamTestCase( + 1, + {'color': '?color=1'} + ), + ParamTestCase( + 3.14, + {'color': '?color=3.14'} + ), + ParamTestCase( + 'blue', + {'color': '?color=%22blue%22'} + ), + ParamTestCase( + 'hello world', + {'color': '?color=%22hello%20world%22'} + ), + ParamTestCase( + '', + {'color': '?color=%22%22'} + ), + ParamTestCase( + True, + {'color': '?color=true'} + ), + ParamTestCase( + False, + {'color': '?color=false'} + ), + ParamTestCase( + [], + {'color': '?color=%5B%5D'} + ), + ParamTestCase( + ['blue', 'black', 'brown'], + {'color': '?color=%5B%22blue%22%2C%22black%22%2C%22brown%22%5D'} + ), + ParamTestCase( + {}, + {'color': '?color=%7B%7D'} + ), + ParamTestCase( + dict(R=100, G=200, B=150), + {'color': '?color=%7B%22R%22%3A100%2C%22G%22%3A200%2C%22B%22%3A150%7D'} + ), + ) + for test_case in test_cases: + parameter = api_client.QueryParameter( + name=name, + content={'application/json': schemas.AnyTypeSchema} + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + def test_throws_error_for_unimplemented_serialization(self): with self.assertRaises(NotImplementedError): parameter = api_client.HeaderParameter( diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py new file mode 100644 index 0000000000..042fe206c4 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import petstore_api +from petstore_api.paths.fake import get # noqa: E501 +from petstore_api import configuration, schemas, api_client + +from ... import ApiTestMixin + + +class TestFake(ApiTestMixin, unittest.TestCase): + """ + Fake unit test stubs + To test enum parameters # noqa: E501 + """ + used_api_client = api_client.ApiClient( + header_name='enum_header_string', + header_value='_abc' + ) + api = get.ApiForget(api_client=used_api_client) + + @patch.object(urllib3.PoolManager, 'request') + def test_passed_in_header_overrides_default(self, mock_request): + mock_request.return_value = self.response(b'') + + api_response = self.api.get(header_params={'enum_header_string': '-efg'}) + self.assert_pool_manager_request_called_with( + mock_request, + f'http://petstore.swagger.io:80/v2/fake', + body=None, + method='GET', + content_type=None, + accept_content_type=None, + headers={'enum_header_string': '-efg'} + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + assert isinstance(api_response.headers, schemas.Unset) + assert api_response.response.status == 200 + + @patch.object(urllib3.PoolManager, 'request') + def test_default_header_used_when_no_header_params_input(self, mock_request): + mock_request.return_value = self.response(b'') + + api_response = self.api.get() + self.assert_pool_manager_request_called_with( + mock_request, + f'http://petstore.swagger.io:80/v2/fake', + body=None, + method='GET', + content_type=None, + accept_content_type=None, + headers={'enum_header_string': '_abc'} + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + assert isinstance(api_response.headers, schemas.Unset) + assert api_response.response.status == 200 + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py new file mode 100644 index 0000000000..025a4eb2a8 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import collections +import unittest +from unittest.mock import patch + +import urllib3 + +import petstore_api +from petstore_api.paths.fake_query_param_with_json_content_type import get # noqa: E501 +from petstore_api import configuration, schemas, api_client + +from ... import ApiTestMixin, ParamTestCase + + +class TestFakeQueryParamWithJsonContentType(ApiTestMixin, unittest.TestCase): + """ + FakeQueryParamWithJsonContentType unit test stubs + query param with json content-type # noqa: E501 + """ + @patch.object(urllib3.PoolManager, 'request') + def test_get(self, mock_request): + used_api_client = api_client.ApiClient() + api = get.ApiForget(api_client=used_api_client) + + response_json = {} + body = self.json_bytes(response_json) + mock_request.return_value = self.response(body) + + test_cases = ( + ParamTestCase( + None, + 'null' + ), + ParamTestCase( + 1, + '1' + ), + ParamTestCase( + 3.14, + '3.14' + ), + ParamTestCase( + 'blue', + '%22blue%22' + ), + ParamTestCase( + 'hello world', + '%22hello%20world%22' + ), + ParamTestCase( + '', + '%22%22' + ), + ParamTestCase( + True, + 'true' + ), + ParamTestCase( + False, + 'false' + ), + ParamTestCase( + [], + '%5B%5D' + ), + ParamTestCase( + ['blue', 'black', 'brown'], + '%5B%22blue%22%2C%22black%22%2C%22brown%22%5D' + ), + ParamTestCase( + {}, + '%7B%7D' + ), + ParamTestCase( + dict(R=100, G=200, B=150), + '%7B%22R%22%3A100%2C%22G%22%3A200%2C%22B%22%3A150%7D' + ), + ) + + for test_case in test_cases: + api_response = api.get(query_params={'someParam': test_case.payload}) + self.assert_pool_manager_request_called_with( + mock_request, + f'http://petstore.swagger.io:80/v2/fake/queryParamWithJsonContentType?someParam={test_case.expected_serialization}', + body=None, + method='GET', + content_type=None, + accept_content_type='application/json', + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.AnyTypeSchema) + assert isinstance(api_response.body, schemas.frozendict.frozendict) + assert isinstance(api_response.headers, schemas.Unset) + assert api_response.response.status == 200 + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py index c105f631b0..81cb92cd13 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py @@ -27,7 +27,7 @@ class TestPetPetId(ApiTestMixin, unittest.TestCase): def test_get(self): config_with_auth = configuration.Configuration(api_key={'api_key': 'someKey'}) used_api_client = api_client.ApiClient(configuration=config_with_auth) - api = get.ApiForget(api_client=used_api_client) # noqa: E501 + api = get.ApiForget(api_client=used_api_client) with patch.object(urllib3.PoolManager, 'request') as mock_request: response_json = { @@ -61,15 +61,5 @@ class TestPetPetId(ApiTestMixin, unittest.TestCase): assert api_response.response.status == 200 - - - - response_status = 200 - - - - - - if __name__ == '__main__': unittest.main()